itlab-internal-services 2.16.11 → 2.16.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/dist/classes/document/content-document.class.d.ts +2 -2
  2. package/dist/classes/fetch-options/content-options.class.d.ts +2 -2
  3. package/dist/decorators/jwt.decorator.d.ts +1 -1
  4. package/dist/decorators/jwt.decorator.js +11 -13
  5. package/dist/hub-resource.enum.d.ts +0 -23
  6. package/dist/hub-resource.enum.js +1 -25
  7. package/dist/index.d.ts +0 -6
  8. package/dist/index.js +0 -10
  9. package/dist/modules/comments/comments.controller.d.ts +3 -3
  10. package/dist/modules/comments/comments.controller.js +1 -1
  11. package/dist/modules/comments/comments.service.d.ts +3 -3
  12. package/dist/modules/comments/comments.service.js +1 -1
  13. package/dist/modules/services/providers/books/books.service.d.ts +5 -5
  14. package/dist/modules/services/providers/books/books.service.js +2 -2
  15. package/dist/modules/services/providers/changelog/changelog.service.d.ts +1 -14
  16. package/dist/modules/services/providers/conflicts/conflicts.service.d.ts +5 -15
  17. package/dist/modules/services/providers/conflicts/conflicts.service.js +2 -2
  18. package/dist/modules/services/providers/content/content-return-types.d.ts +5 -5
  19. package/dist/modules/services/providers/content/content.service.d.ts +7 -6
  20. package/dist/modules/services/providers/demo-hive/demo-hive.service.d.ts +5 -5
  21. package/dist/modules/services/providers/demo-hive/demo-hive.service.js +2 -2
  22. package/dist/modules/services/providers/events/events.service.d.ts +5 -5
  23. package/dist/modules/services/providers/events/events.service.js +2 -2
  24. package/dist/modules/services/providers/files/files.service.d.ts +9 -30
  25. package/dist/modules/services/providers/files/files.service.js +4 -4
  26. package/dist/modules/services/providers/mail/dtos/newsletter-issue-mail.dto.v1.d.ts +2 -2
  27. package/dist/modules/services/providers/newsletter/newsletter.service.d.ts +5 -5
  28. package/dist/modules/services/providers/newsletter/newsletter.service.js +2 -2
  29. package/dist/modules/services/providers/newsroom/newsroom.service.d.ts +5 -5
  30. package/dist/modules/services/providers/newsroom/newsroom.service.js +2 -2
  31. package/dist/modules/services/providers/notifications/notifications.service.d.ts +5 -18
  32. package/dist/modules/services/providers/notifications/notifications.service.js +5 -3
  33. package/dist/modules/services/providers/podcasts/podcasts.service.d.ts +5 -5
  34. package/dist/modules/services/providers/podcasts/podcasts.service.js +2 -2
  35. package/dist/modules/services/providers/quick-links/quick-links.service.d.ts +5 -17
  36. package/dist/modules/services/providers/quick-links/quick-links.service.js +2 -2
  37. package/dist/pipes/restricted-fields.pipe.js +3 -1
  38. package/package.json +23 -23
  39. package/dist/classes/document-updater.class.d.ts +0 -40
  40. package/dist/classes/document-updater.class.js +0 -58
  41. package/dist/factories/index.d.ts +0 -1
  42. package/dist/factories/index.js +0 -5
  43. package/dist/factories/virtuals.factory.d.ts +0 -80
  44. package/dist/factories/virtuals.factory.js +0 -172
  45. package/dist/functions/create-duplicate-checker.function.d.ts +0 -29
  46. package/dist/functions/create-duplicate-checker.function.js +0 -52
  47. package/dist/likeable.interface.d.ts +0 -42
  48. package/dist/likeable.interface.js +0 -48
  49. package/dist/modules/_old/comment/comment.controller.d.ts +0 -35
  50. package/dist/modules/_old/comment/comment.controller.js +0 -86
  51. package/dist/modules/_old/comment/comment.model.d.ts +0 -29
  52. package/dist/modules/_old/comment/comment.model.js +0 -43
  53. package/dist/modules/_old/comment/comment.module-definition.d.ts +0 -45
  54. package/dist/modules/_old/comment/comment.module-definition.js +0 -8
  55. package/dist/modules/_old/comment/comment.module.d.ts +0 -22
  56. package/dist/modules/_old/comment/comment.module.js +0 -71
  57. package/dist/modules/_old/comment/comment.service.d.ts +0 -54
  58. package/dist/modules/_old/comment/comment.service.js +0 -133
  59. package/dist/modules/_old/comment/index.d.ts +0 -3
  60. package/dist/modules/_old/comment/index.js +0 -9
  61. package/dist/modules/_old/content/content.module-definition.d.ts +0 -5
  62. package/dist/modules/_old/content/content.module-definition.js +0 -8
  63. package/dist/modules/_old/content/content.module.d.ts +0 -31
  64. package/dist/modules/_old/content/content.module.js +0 -60
  65. package/dist/modules/_old/content/content.service.d.ts +0 -50
  66. package/dist/modules/_old/content/content.service.js +0 -145
  67. package/dist/modules/_old/content/index.d.ts +0 -2
  68. package/dist/modules/_old/content/index.js +0 -7
  69. package/dist/modules/_old/database/database-module-options.interface.d.ts +0 -41
  70. package/dist/modules/_old/database/database-module-options.interface.js +0 -2
  71. package/dist/modules/_old/database/database.liveness-controller.d.ts +0 -27
  72. package/dist/modules/_old/database/database.liveness-controller.js +0 -80
  73. package/dist/modules/_old/database/database.module.d.ts +0 -41
  74. package/dist/modules/_old/database/database.module.js +0 -97
  75. package/dist/modules/_old/database/index.d.ts +0 -6
  76. package/dist/modules/_old/database/index.js +0 -13
  77. package/dist/modules/_old/database/lock-service/lock.schema.d.ts +0 -38
  78. package/dist/modules/_old/database/lock-service/lock.schema.js +0 -51
  79. package/dist/modules/_old/database/lock-service/lock.service.d.ts +0 -53
  80. package/dist/modules/_old/database/lock-service/lock.service.js +0 -103
  81. package/dist/modules/_old/database/model-service/dbs/hub-account.db.d.ts +0 -28
  82. package/dist/modules/_old/database/model-service/dbs/hub-account.db.js +0 -44
  83. package/dist/modules/_old/database/model-service/dbs/hub-books.db.d.ts +0 -23
  84. package/dist/modules/_old/database/model-service/dbs/hub-books.db.js +0 -45
  85. package/dist/modules/_old/database/model-service/dbs/hub-comments.db.d.ts +0 -29
  86. package/dist/modules/_old/database/model-service/dbs/hub-comments.db.js +0 -68
  87. package/dist/modules/_old/database/model-service/dbs/hub-content.db.d.ts +0 -24
  88. package/dist/modules/_old/database/model-service/dbs/hub-content.db.js +0 -49
  89. package/dist/modules/_old/database/model-service/dbs/hub-demo-hive.db.d.ts +0 -23
  90. package/dist/modules/_old/database/model-service/dbs/hub-demo-hive.db.js +0 -45
  91. package/dist/modules/_old/database/model-service/dbs/hub-events.db.d.ts +0 -24
  92. package/dist/modules/_old/database/model-service/dbs/hub-events.db.js +0 -49
  93. package/dist/modules/_old/database/model-service/dbs/hub-hackschool.db.d.ts +0 -60
  94. package/dist/modules/_old/database/model-service/dbs/hub-hackschool.db.js +0 -106
  95. package/dist/modules/_old/database/model-service/dbs/hub-newsroom.db.d.ts +0 -25
  96. package/dist/modules/_old/database/model-service/dbs/hub-newsroom.db.js +0 -53
  97. package/dist/modules/_old/database/model-service/dbs/hub-podcasts.db.d.ts +0 -23
  98. package/dist/modules/_old/database/model-service/dbs/hub-podcasts.db.js +0 -45
  99. package/dist/modules/_old/database/model-service/dbs/hub-team.db.d.ts +0 -22
  100. package/dist/modules/_old/database/model-service/dbs/hub-team.db.js +0 -41
  101. package/dist/modules/_old/database/model-service/dbs/hub-tech-radar.db.d.ts +0 -42
  102. package/dist/modules/_old/database/model-service/dbs/hub-tech-radar.db.js +0 -81
  103. package/dist/modules/_old/database/model-service/model.service.d.ts +0 -8465
  104. package/dist/modules/_old/database/model-service/model.service.js +0 -136
  105. package/dist/modules/_old/database/populate-service/populate.service.d.ts +0 -73
  106. package/dist/modules/_old/database/populate-service/populate.service.js +0 -163
  107. package/dist/modules/_old/database/service-mapper-service/service-mapper.service.d.ts +0 -32
  108. package/dist/modules/_old/database/service-mapper-service/service-mapper.service.js +0 -73
  109. package/dist/modules/_old/fetch/fetch.module.d.ts +0 -31
  110. package/dist/modules/_old/fetch/fetch.module.js +0 -60
  111. package/dist/modules/_old/fetch/fetch.service.d.ts +0 -153
  112. package/dist/modules/_old/fetch/fetch.service.js +0 -274
  113. package/dist/modules/_old/fetch/index.d.ts +0 -2
  114. package/dist/modules/_old/fetch/index.js +0 -7
  115. package/dist/modules/_old/index.d.ts +0 -5
  116. package/dist/modules/_old/index.js +0 -21
  117. package/dist/modules/_old/like/index.d.ts +0 -1
  118. package/dist/modules/_old/like/index.js +0 -5
  119. package/dist/modules/_old/like/like.controller.d.ts +0 -41
  120. package/dist/modules/_old/like/like.controller.js +0 -125
  121. package/dist/modules/_old/like/like.module-definition.d.ts +0 -20
  122. package/dist/modules/_old/like/like.module-definition.js +0 -8
  123. package/dist/modules/_old/like/like.module.d.ts +0 -21
  124. package/dist/modules/_old/like/like.module.js +0 -67
  125. package/dist/modules/_old/like/like.service.d.ts +0 -61
  126. package/dist/modules/_old/like/like.service.js +0 -103
  127. package/dist/viewable.interface.d.ts +0 -42
  128. package/dist/viewable.interface.js +0 -48
@@ -1,8 +1,8 @@
1
- import { LabContent, LabContentPopulated } from 'itlab-functions';
1
+ import { LabHtmlContent, LabJsonContent, LabTextContent } from 'itlab-functions';
2
2
  import { Document } from 'mongoose';
3
3
  export declare function ContentDocument<TBase extends new (...args: any[]) => Document>(Base: TBase): {
4
4
  new (...args: any[]): {
5
- content?: LabContent | LabContentPopulated | string;
5
+ content?: LabJsonContent | LabHtmlContent | LabTextContent;
6
6
  _id: unknown;
7
7
  $assertPopulated<Paths = {}>(path: string | string[], values?: Partial<Paths>): Omit</*elided*/ any, keyof Paths> & Paths;
8
8
  $clearModifiedPaths(): /*elided*/ any;
@@ -1,4 +1,4 @@
1
- import { LabContent, LabContentPopulated } from 'itlab-functions';
1
+ import { LabHtmlContent, LabJsonContent, LabTextContent } from 'itlab-functions';
2
2
  import { ContentReturnType, ContentService } from '../../modules';
3
3
  export type ContentFetchOptions = {
4
4
  includeContent?: ContentReturnType;
@@ -13,5 +13,5 @@ export declare function populateContent(options: {
13
13
  includeContent?: ContentReturnType;
14
14
  }, items: {
15
15
  _id: unknown;
16
- content?: LabContent | LabContentPopulated | string;
16
+ content?: LabJsonContent | LabTextContent | LabHtmlContent;
17
17
  }[], contentService: ContentService): Promise<void>;
@@ -9,4 +9,4 @@
9
9
  * @throws {UnprocessableEntityException} When the 'Authorization' header is missing.
10
10
  * @returns {string} The extracted JWT token without the 'Bearer ' prefix.
11
11
  */
12
- export declare function Jwt(): ParameterDecorator;
12
+ export declare const Jwt: (...dataOrPipes: any[]) => ParameterDecorator;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Jwt = Jwt;
3
+ exports.Jwt = void 0;
4
4
  const common_1 = require("@nestjs/common");
5
5
  /**
6
6
  * Custom decorator to extract the JWT token from the request headers.
@@ -13,15 +13,13 @@ const common_1 = require("@nestjs/common");
13
13
  * @throws {UnprocessableEntityException} When the 'Authorization' header is missing.
14
14
  * @returns {string} The extracted JWT token without the 'Bearer ' prefix.
15
15
  */
16
- function Jwt() {
17
- return (0, common_1.createParamDecorator)((_, executionContext) => {
18
- const request = executionContext.switchToHttp().getRequest();
19
- const authHeader = request.header('Authorization');
20
- if (!authHeader) {
21
- throw new common_1.UnprocessableEntityException('Authorization header is missing from the request');
22
- }
23
- // Extract token by removing the 'Bearer ' prefix (case-insensitive)
24
- const token = authHeader.replace(/^Bearer\s+/i, '');
25
- return token;
26
- });
27
- }
16
+ exports.Jwt = (0, common_1.createParamDecorator)((_, executionContext) => {
17
+ const request = executionContext.switchToHttp().getRequest();
18
+ const authHeader = request.header('Authorization');
19
+ if (!authHeader) {
20
+ throw new common_1.UnprocessableEntityException('Authorization header is missing from the request');
21
+ }
22
+ // Extract token by removing the 'Bearer ' prefix (case-insensitive)
23
+ const token = authHeader.replace(/^Bearer\s+/i, '');
24
+ return token;
25
+ });
@@ -39,29 +39,6 @@ export declare enum HubResource {
39
39
  HUB_CHANGELOG = "hub-changelog",
40
40
  ANY = "any"
41
41
  }
42
- /**
43
- * FetchableHubResource TODO: remove
44
- *
45
- * Defines a strict subset of `HubResource` values that support fetch operations,
46
- * such as querying external APIs or syncing with third-party services.
47
- *
48
- * This enum maps directly to the `HubResource` enum for type compatibility and avoids duplication.
49
- */
50
- export declare enum FetchableHubResource {
51
- NEWSROOM_NEWS = "newsroom-news",
52
- EVENTS_EVENT = "events-event",
53
- DEMO_HIVE_DEMO = "demo-hive-demo",
54
- HACKSCHOOL_COURSE = "hackschool-course",
55
- HACKSCHOOL_THREAD = "hackschool-thread",
56
- HACKSCHOOL_DOC = "hackschool-doc",
57
- TECH_RADAR_BLIP = "tech-radar-blip",
58
- TECH_RADAR_EDITION = "tech-radar-edition",
59
- PODCASTS_PODCAST = "podcasts-podcast",
60
- BOOKS_BOOK = "books-book",
61
- TEAM_MEMBER = "team-member",
62
- NEWSLETTER_ISSUE = "newsletter-issue",
63
- HUB_USER = "hub-user"
64
- }
65
42
  /**
66
43
  * HUB_RESOURCES
67
44
  *
@@ -12,7 +12,7 @@
12
12
  * - `HUB_RESOURCES`: List of all `HubResource` enum values, used for iteration and validation.
13
13
  */
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.HUB_RESOURCES = exports.FetchableHubResource = exports.HubResource = void 0;
15
+ exports.HUB_RESOURCES = exports.HubResource = void 0;
16
16
  /**
17
17
  * HubResource
18
18
  *
@@ -43,30 +43,6 @@ var HubResource;
43
43
  HubResource["HUB_CHANGELOG"] = "hub-changelog";
44
44
  HubResource["ANY"] = "any";
45
45
  })(HubResource || (exports.HubResource = HubResource = {}));
46
- /**
47
- * FetchableHubResource TODO: remove
48
- *
49
- * Defines a strict subset of `HubResource` values that support fetch operations,
50
- * such as querying external APIs or syncing with third-party services.
51
- *
52
- * This enum maps directly to the `HubResource` enum for type compatibility and avoids duplication.
53
- */
54
- var FetchableHubResource;
55
- (function (FetchableHubResource) {
56
- FetchableHubResource["NEWSROOM_NEWS"] = "newsroom-news";
57
- FetchableHubResource["EVENTS_EVENT"] = "events-event";
58
- FetchableHubResource["DEMO_HIVE_DEMO"] = "demo-hive-demo";
59
- FetchableHubResource["HACKSCHOOL_COURSE"] = "hackschool-course";
60
- FetchableHubResource["HACKSCHOOL_THREAD"] = "hackschool-thread";
61
- FetchableHubResource["HACKSCHOOL_DOC"] = "hackschool-doc";
62
- FetchableHubResource["TECH_RADAR_BLIP"] = "tech-radar-blip";
63
- FetchableHubResource["TECH_RADAR_EDITION"] = "tech-radar-edition";
64
- FetchableHubResource["PODCASTS_PODCAST"] = "podcasts-podcast";
65
- FetchableHubResource["BOOKS_BOOK"] = "books-book";
66
- FetchableHubResource["TEAM_MEMBER"] = "team-member";
67
- FetchableHubResource["NEWSLETTER_ISSUE"] = "newsletter-issue";
68
- FetchableHubResource["HUB_USER"] = "hub-user";
69
- })(FetchableHubResource || (exports.FetchableHubResource = FetchableHubResource = {}));
70
46
  /**
71
47
  * HUB_RESOURCES
72
48
  *
package/dist/index.d.ts CHANGED
@@ -12,9 +12,3 @@ export * from './swagger';
12
12
  export * from './transform';
13
13
  export * from './types';
14
14
  export * from './hub-resource.enum';
15
- export { DocumentUpdater } from './classes/document-updater.class';
16
- export * from './factories';
17
- export { createDuplicateChecker } from './functions/create-duplicate-checker.function';
18
- export * from './likeable.interface';
19
- export * from './modules/_old';
20
- export * from './viewable.interface';
package/dist/index.js CHANGED
@@ -14,7 +14,6 @@ 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
- exports.createDuplicateChecker = exports.DocumentUpdater = void 0;
18
17
  __exportStar(require("./classes"), exports);
19
18
  __exportStar(require("./controllers"), exports);
20
19
  __exportStar(require("./decorators"), exports);
@@ -29,12 +28,3 @@ __exportStar(require("./swagger"), exports);
29
28
  __exportStar(require("./transform"), exports);
30
29
  __exportStar(require("./types"), exports);
31
30
  __exportStar(require("./hub-resource.enum"), exports);
32
- // TODO: REMOVE
33
- var document_updater_class_1 = require("./classes/document-updater.class");
34
- Object.defineProperty(exports, "DocumentUpdater", { enumerable: true, get: function () { return document_updater_class_1.DocumentUpdater; } });
35
- __exportStar(require("./factories"), exports);
36
- var create_duplicate_checker_function_1 = require("./functions/create-duplicate-checker.function");
37
- Object.defineProperty(exports, "createDuplicateChecker", { enumerable: true, get: function () { return create_duplicate_checker_function_1.createDuplicateChecker; } });
38
- __exportStar(require("./likeable.interface"), exports);
39
- __exportStar(require("./modules/_old"), exports);
40
- __exportStar(require("./viewable.interface"), exports);
@@ -1,4 +1,4 @@
1
- import { LabComment, LabContentRichtext } from 'itlab-functions';
1
+ import { LabComment, LabJsonContentRichtext } from 'itlab-functions';
2
2
  import { CommentsModuleOptions } from './comments-module-options.interface';
3
3
  import { CommentsService } from './comments.service';
4
4
  /**
@@ -22,9 +22,9 @@ export declare function createCommentsController(options: CommentsModuleOptions<
22
22
  *
23
23
  * @param {string} resourceId - MongoDB ObjectId of the resource being commented on.
24
24
  * @param {string} accountId - Authenticated user's account ID.
25
- * @param {LabContentRichtext} comment - Rich text content of the comment.
25
+ * @param {LabJsonContentRichtext} comment - Rich text content of the comment.
26
26
  * @returns {Promise<LabComment>} The saved comment object.
27
27
  */
28
- postComment(resourceId: string, accountId: string, comment: LabContentRichtext): Promise<LabComment>;
28
+ postComment(resourceId: string, accountId: string, comment: LabJsonContentRichtext): Promise<LabComment>;
29
29
  };
30
30
  };
@@ -45,7 +45,7 @@ function createCommentsController(options) {
45
45
  *
46
46
  * @param {string} resourceId - MongoDB ObjectId of the resource being commented on.
47
47
  * @param {string} accountId - Authenticated user's account ID.
48
- * @param {LabContentRichtext} comment - Rich text content of the comment.
48
+ * @param {LabJsonContentRichtext} comment - Rich text content of the comment.
49
49
  * @returns {Promise<LabComment>} The saved comment object.
50
50
  */
51
51
  async postComment(resourceId, accountId, comment) {
@@ -1,5 +1,5 @@
1
1
  import { ConfigService } from '@nestjs/config';
2
- import { LabComment, LabContentRichtext } from 'itlab-functions';
2
+ import { LabComment, LabJsonContentRichtext } from 'itlab-functions';
3
3
  import { Connection } from 'mongoose';
4
4
  import { AuthenticationModuleOptions } from '../authentication';
5
5
  import { CacheService } from '../cache';
@@ -39,12 +39,12 @@ export declare class CommentsService extends BaseHttpService {
39
39
  *
40
40
  * @param {string} resourceId - MongoDB ObjectId of the resource being commented on.
41
41
  * @param {string} accountId - Authenticated user ID posting the comment.
42
- * @param {LabContentRichtext} richtext - Comment content in rich-text format.
42
+ * @param {LabJsonContentRichtext} richtext - Comment content in rich-text format.
43
43
  * @returns {Promise<LabComment>} Resolves with the saved comment or throws an HTTP exception.
44
44
  * @throws {NotFoundException} If the resource does not exist.
45
45
  * @throws {HttpException} If the internal service call fails.
46
46
  */
47
- postCommentV1(resourceId: string, accountId: string, richtext: LabContentRichtext): Promise<LabComment>;
47
+ postCommentV1(resourceId: string, accountId: string, richtext: LabJsonContentRichtext): Promise<LabComment>;
48
48
  /**
49
49
  * Deletes all comments for a given resource.
50
50
  * Logs success or failure. Does not throw to avoid disrupting cleanup flows.
@@ -72,7 +72,7 @@ let CommentsService = class CommentsService extends base_http_service_1.BaseHttp
72
72
  *
73
73
  * @param {string} resourceId - MongoDB ObjectId of the resource being commented on.
74
74
  * @param {string} accountId - Authenticated user ID posting the comment.
75
- * @param {LabContentRichtext} richtext - Comment content in rich-text format.
75
+ * @param {LabJsonContentRichtext} richtext - Comment content in rich-text format.
76
76
  * @returns {Promise<LabComment>} Resolves with the saved comment or throws an HTTP exception.
77
77
  * @throws {NotFoundException} If the resource does not exist.
78
78
  * @throws {HttpException} If the internal service call fails.
@@ -1,5 +1,5 @@
1
1
  import { ConfigService } from '@nestjs/config';
2
- import { LabBook } from 'itlab-functions';
2
+ import { LabBooksBook } from 'itlab-functions';
3
3
  import { AuthenticationModuleOptions } from '../../../authentication';
4
4
  import { BaseHttpService } from '../../base-http.service';
5
5
  import { FetchBookOptionsDtoV1 } from './fetch-book-options.dto.v1.type';
@@ -33,9 +33,9 @@ export declare class BooksService extends BaseHttpService {
33
33
  *
34
34
  * @param {string} bookId - Unique MongoDB identifier of the book.
35
35
  * @param {FetchBookOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
36
- * @returns {Promise<LabBook | undefined>} Resolves to an Book or `undefined` on failure.
36
+ * @returns {Promise<LabBooksBook | undefined>} Resolves to an Book or `undefined` on failure.
37
37
  */
38
- fetchBookV1(bookId: string, options?: FetchBookOptionsDtoV1): Promise<LabBook | undefined>;
38
+ fetchBookV1(bookId: string, options?: FetchBookOptionsDtoV1): Promise<LabBooksBook | undefined>;
39
39
  /**
40
40
  * Retrieves a collection of book entries.
41
41
  *
@@ -43,7 +43,7 @@ export declare class BooksService extends BaseHttpService {
43
43
  * Returns an empty array if the downstream service call fails.
44
44
  *
45
45
  * @param {FetchBookOptionsDtoV1} [options] - Optional filter options for narrowing results.
46
- * @returns {Promise<LabBook[]>} Resolves to a list of books, or an empty array if none found.
46
+ * @returns {Promise<LabBooksBook[]>} Resolves to a list of books, or an empty array if none found.
47
47
  */
48
- fetchBookCollectionV1(options?: FetchBookOptionsDtoV1): Promise<LabBook[]>;
48
+ fetchBookCollectionV1(options?: FetchBookOptionsDtoV1): Promise<LabBooksBook[]>;
49
49
  }
@@ -53,7 +53,7 @@ let BooksService = class BooksService extends base_http_service_1.BaseHttpServic
53
53
  *
54
54
  * @param {string} bookId - Unique MongoDB identifier of the book.
55
55
  * @param {FetchBookOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
56
- * @returns {Promise<LabBook | undefined>} Resolves to an Book or `undefined` on failure.
56
+ * @returns {Promise<LabBooksBook | undefined>} Resolves to an Book or `undefined` on failure.
57
57
  */
58
58
  async fetchBookV1(bookId, options) {
59
59
  return this.fetchResource(`v1/internal/book/${bookId}`, { params: options });
@@ -65,7 +65,7 @@ let BooksService = class BooksService extends base_http_service_1.BaseHttpServic
65
65
  * Returns an empty array if the downstream service call fails.
66
66
  *
67
67
  * @param {FetchBookOptionsDtoV1} [options] - Optional filter options for narrowing results.
68
- * @returns {Promise<LabBook[]>} Resolves to a list of books, or an empty array if none found.
68
+ * @returns {Promise<LabBooksBook[]>} Resolves to a list of books, or an empty array if none found.
69
69
  */
70
70
  async fetchBookCollectionV1(options) {
71
71
  return this.fetchResourceCollection(`v1/internal/books`, { params: options });
@@ -1,20 +1,8 @@
1
1
  import { ConfigService } from '@nestjs/config';
2
- import { User } from '../../../../models';
2
+ import { LabChangelogChange } from 'itlab-functions';
3
3
  import { AuthenticationModuleOptions } from '../../../authentication';
4
4
  import { BaseHttpService } from '../../base-http.service';
5
5
  import { FetchChangeOptionsDtoV1 } from './fetch-change-options.dto.v1.type';
6
- type LabChangelogChange = {
7
- id: string;
8
- _year: number;
9
- _month: number;
10
- _date: number;
11
- contactId: string;
12
- timestamp: number;
13
- draft: boolean;
14
- silencedNotification: boolean;
15
- content: string;
16
- contact?: User;
17
- };
18
6
  /**
19
7
  * ChangelogService
20
8
  *
@@ -59,4 +47,3 @@ export declare class ChangelogService extends BaseHttpService {
59
47
  */
60
48
  fetchChangelogCollectionV1(options?: FetchChangeOptionsDtoV1): Promise<LabChangelogChange[]>;
61
49
  }
62
- export {};
@@ -1,17 +1,8 @@
1
1
  import { ConfigService } from '@nestjs/config';
2
+ import { LabConflictsConflict } from 'itlab-functions';
2
3
  import { AuthenticationModuleOptions } from '../../../authentication';
3
4
  import { BaseHttpService } from '../../base-http.service';
4
5
  import { FetchConflictOptionsDtoV1 } from './fetch-conflict-options.dto.v1.type';
5
- type LabConflict = {
6
- id: string;
7
- _url: string;
8
- _resource: string;
9
- _resourceId: string;
10
- firstRecordedAt: Date;
11
- lastRecordedAt: Date;
12
- level: number;
13
- message: number;
14
- };
15
6
  /**
16
7
  * ConflictsService
17
8
  *
@@ -42,9 +33,9 @@ export declare class ConflictsService extends BaseHttpService {
42
33
  *
43
34
  * @param {string} conflictId - Unique MongoDB identifier of the conflict.
44
35
  * @param {FetchConflictOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
45
- * @returns {Promise<LabConflict | undefined>} Resolves to an Conflict or `undefined` on failure.
36
+ * @returns {Promise<LabConflictsConflict | undefined>} Resolves to an Conflict or `undefined` on failure.
46
37
  */
47
- fetchConflictV1(conflictId: string, options?: FetchConflictOptionsDtoV1): Promise<LabConflict | undefined>;
38
+ fetchConflictV1(conflictId: string, options?: FetchConflictOptionsDtoV1): Promise<LabConflictsConflict | undefined>;
48
39
  /**
49
40
  * Retrieves a collection of conflict entries.
50
41
  *
@@ -52,8 +43,7 @@ export declare class ConflictsService extends BaseHttpService {
52
43
  * Returns an empty array if the downstream service call fails.
53
44
  *
54
45
  * @param {FetchConflictOptionsDtoV1} [options] - Optional filter options for narrowing results.
55
- * @returns {Promise<LabConflict[]>} Resolves to a list of conflicts, or an empty array if none found.
46
+ * @returns {Promise<LabConflictsConflict[]>} Resolves to a list of conflicts, or an empty array if none found.
56
47
  */
57
- fetchConflictCollectionV1(options?: FetchConflictOptionsDtoV1): Promise<LabConflict[]>;
48
+ fetchConflictCollectionV1(options?: FetchConflictOptionsDtoV1): Promise<LabConflictsConflict[]>;
58
49
  }
59
- export {};
@@ -53,7 +53,7 @@ let ConflictsService = class ConflictsService extends base_http_service_1.BaseHt
53
53
  *
54
54
  * @param {string} conflictId - Unique MongoDB identifier of the conflict.
55
55
  * @param {FetchConflictOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
56
- * @returns {Promise<LabConflict | undefined>} Resolves to an Conflict or `undefined` on failure.
56
+ * @returns {Promise<LabConflictsConflict | undefined>} Resolves to an Conflict or `undefined` on failure.
57
57
  */
58
58
  async fetchConflictV1(conflictId, options) {
59
59
  return this.fetchResource(`v1/internal/conflict/${conflictId}`, { params: options });
@@ -65,7 +65,7 @@ let ConflictsService = class ConflictsService extends base_http_service_1.BaseHt
65
65
  * Returns an empty array if the downstream service call fails.
66
66
  *
67
67
  * @param {FetchConflictOptionsDtoV1} [options] - Optional filter options for narrowing results.
68
- * @returns {Promise<LabConflict[]>} Resolves to a list of conflicts, or an empty array if none found.
68
+ * @returns {Promise<LabConflictsConflict[]>} Resolves to a list of conflicts, or an empty array if none found.
69
69
  */
70
70
  async fetchConflictCollectionV1(options) {
71
71
  return this.fetchResourceCollection(`v1/internal/conflicts`, { params: options });
@@ -1,4 +1,4 @@
1
- import { LabContent, LabContentPopulated } from 'itlab-functions';
1
+ import { LabHtmlContent, LabHtmlPopulatedContent, LabJsonContent, LabTextContent } from 'itlab-functions';
2
2
  /**
3
3
  * Constant list of supported digital pass types.
4
4
  */
@@ -12,9 +12,9 @@ export type ContentReturnType = (typeof supportedContentReturnTypes)[number];
12
12
  * This enables type-safe payload handling when creating passes.
13
13
  */
14
14
  export type ContentReturnTypeMap = {
15
- json: LabContent;
16
- text: string;
17
- html: LabContent;
18
- htmlPopulated: LabContentPopulated;
15
+ json: LabJsonContent;
16
+ text: LabTextContent;
17
+ html: LabHtmlContent;
18
+ htmlPopulated: LabHtmlPopulatedContent;
19
19
  };
20
20
  export declare const ContentReturnTypeEndpointMap: Record<ContentReturnType, string>;
@@ -1,6 +1,6 @@
1
1
  import { DynamicModule } from '@nestjs/common';
2
2
  import { ConfigService } from '@nestjs/config';
3
- import { LabContent, LabContentPopulated } from 'itlab-functions';
3
+ import { LabHtmlContent, LabJsonContent, LabTextContent } from 'itlab-functions';
4
4
  import { HubResource } from '../../../../hub-resource.enum';
5
5
  import { AuthenticationModuleOptions } from '../../../authentication';
6
6
  import { CacheService } from '../../../cache';
@@ -16,8 +16,9 @@ type ContentSchema = {
16
16
  id: string;
17
17
  _resource: string;
18
18
  _resourceId: string;
19
- json: LabContent;
20
- htmlPopulated: LabContentPopulated;
19
+ json: LabJsonContent;
20
+ html: LabHtmlContent;
21
+ text: LabTextContent;
21
22
  };
22
23
  /**
23
24
  * Service responsible for all operations with the Organisation Hub Content Service.
@@ -92,7 +93,7 @@ export declare class ContentService extends BaseHttpService {
92
93
  * @returns Resolves if validation is successful.
93
94
  * @throws HttpException if the backend returns an error.
94
95
  */
95
- validateContentV1(content: LabContent): Promise<void>;
96
+ validateContentV1(content: LabJsonContent): Promise<void>;
96
97
  /**
97
98
  * Submits content for a given resource.
98
99
  *
@@ -100,7 +101,7 @@ export declare class ContentService extends BaseHttpService {
100
101
  * @param content Content object to submit.
101
102
  * @throws HttpException if the backend returns an error.
102
103
  */
103
- submitContentV1(resourceId: string, content: LabContent): Promise<void>;
104
+ submitContentV1(resourceId: string, content: LabJsonContent): Promise<void>;
104
105
  /**
105
106
  * Directly submits content without extra validation.
106
107
  * Backend will handle validation internally.
@@ -109,7 +110,7 @@ export declare class ContentService extends BaseHttpService {
109
110
  * @param content Content object to submit.
110
111
  * @throws HttpException if the backend returns an error.
111
112
  */
112
- validateAndSubmitContentV1(resourceId: string, content: LabContent): Promise<void>;
113
+ validateAndSubmitContentV1(resourceId: string, content: LabJsonContent): Promise<void>;
113
114
  /**
114
115
  * Removes content associated with a given resource.
115
116
  * Logs errors but does not throw; always resolves to allow safe cleanup.
@@ -1,5 +1,5 @@
1
1
  import { ConfigService } from '@nestjs/config';
2
- import { LabDemo } from 'itlab-functions';
2
+ import { LabDemoHiveDemo } from 'itlab-functions';
3
3
  import { AuthenticationModuleOptions } from '../../../authentication';
4
4
  import { BaseHttpService } from '../../base-http.service';
5
5
  import { FetchDemoOptionsDtoV1 } from './fetch-demo-options.dto.v1.type';
@@ -33,9 +33,9 @@ export declare class DemoHiveService extends BaseHttpService {
33
33
  *
34
34
  * @param {string} demoId - Unique MongoDB identifier of the demo.
35
35
  * @param {FetchDemoOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
36
- * @returns {Promise<LabDemo | undefined>} Resolves to an Demo or `undefined` on failure.
36
+ * @returns {Promise<LabDemoHiveDemo | undefined>} Resolves to an Demo or `undefined` on failure.
37
37
  */
38
- fetchDemoV1(demoId: string, options?: FetchDemoOptionsDtoV1): Promise<LabDemo | undefined>;
38
+ fetchDemoV1(demoId: string, options?: FetchDemoOptionsDtoV1): Promise<LabDemoHiveDemo | undefined>;
39
39
  /**
40
40
  * Retrieves a collection of demo entries.
41
41
  *
@@ -43,7 +43,7 @@ export declare class DemoHiveService extends BaseHttpService {
43
43
  * Returns an empty array if the downstream service call fails.
44
44
  *
45
45
  * @param {FetchDemoOptionsDtoV1} [options] - Optional filter options for narrowing results.
46
- * @returns {Promise<LabDemo[]>} Resolves to a list of demos, or an empty array if none found.
46
+ * @returns {Promise<LabDemoHiveDemo[]>} Resolves to a list of demos, or an empty array if none found.
47
47
  */
48
- fetchDemoCollectionV1(options?: FetchDemoOptionsDtoV1): Promise<LabDemo[]>;
48
+ fetchDemoCollectionV1(options?: FetchDemoOptionsDtoV1): Promise<LabDemoHiveDemo[]>;
49
49
  }
@@ -53,7 +53,7 @@ let DemoHiveService = class DemoHiveService extends base_http_service_1.BaseHttp
53
53
  *
54
54
  * @param {string} demoId - Unique MongoDB identifier of the demo.
55
55
  * @param {FetchDemoOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
56
- * @returns {Promise<LabDemo | undefined>} Resolves to an Demo or `undefined` on failure.
56
+ * @returns {Promise<LabDemoHiveDemo | undefined>} Resolves to an Demo or `undefined` on failure.
57
57
  */
58
58
  async fetchDemoV1(demoId, options) {
59
59
  return this.fetchResource(`v1/internal/demo/${demoId}`, { params: options });
@@ -65,7 +65,7 @@ let DemoHiveService = class DemoHiveService extends base_http_service_1.BaseHttp
65
65
  * Returns an empty array if the downstream service call fails.
66
66
  *
67
67
  * @param {FetchDemoOptionsDtoV1} [options] - Optional filter options for narrowing results.
68
- * @returns {Promise<LabDemo[]>} Resolves to a list of demos, or an empty array if none found.
68
+ * @returns {Promise<LabDemoHiveDemo[]>} Resolves to a list of demos, or an empty array if none found.
69
69
  */
70
70
  async fetchDemoCollectionV1(options) {
71
71
  return this.fetchResourceCollection(`v1/internal/demos`, { params: options });
@@ -1,5 +1,5 @@
1
1
  import { ConfigService } from '@nestjs/config';
2
- import { LabEvent } from 'itlab-functions';
2
+ import { LabEventsEvent } from 'itlab-functions';
3
3
  import { AuthenticationModuleOptions } from '../../../authentication';
4
4
  import { BaseHttpService } from '../../base-http.service';
5
5
  import { FetchEventOptionsDtoV1 } from './fetch-event-options.dto.v1.type';
@@ -33,9 +33,9 @@ export declare class EventsService extends BaseHttpService {
33
33
  *
34
34
  * @param {string} eventId - Unique MongoDB identifier of the event.
35
35
  * @param {FetchEventOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
36
- * @returns {Promise<LabEvent | undefined>} Resolves to an Event or `undefined` on failure.
36
+ * @returns {Promise<LabEventsEvent | undefined>} Resolves to an Event or `undefined` on failure.
37
37
  */
38
- fetchEventV1(eventId: string, options?: FetchEventOptionsDtoV1): Promise<LabEvent | undefined>;
38
+ fetchEventV1(eventId: string, options?: FetchEventOptionsDtoV1): Promise<LabEventsEvent | undefined>;
39
39
  /**
40
40
  * Retrieves a collection of event entries.
41
41
  *
@@ -43,7 +43,7 @@ export declare class EventsService extends BaseHttpService {
43
43
  * Returns an empty array if the downstream service call fails.
44
44
  *
45
45
  * @param {FetchEventOptionsDtoV1} [options] - Optional filter options for narrowing results.
46
- * @returns {Promise<LabEvent[]>} Resolves to a list of events, or an empty array if none found.
46
+ * @returns {Promise<LabEventsEvent[]>} Resolves to a list of events, or an empty array if none found.
47
47
  */
48
- fetchEventCollectionV1(options?: FetchEventOptionsDtoV1): Promise<LabEvent[]>;
48
+ fetchEventCollectionV1(options?: FetchEventOptionsDtoV1): Promise<LabEventsEvent[]>;
49
49
  }
@@ -53,7 +53,7 @@ let EventsService = class EventsService extends base_http_service_1.BaseHttpServ
53
53
  *
54
54
  * @param {string} eventId - Unique MongoDB identifier of the event.
55
55
  * @param {FetchEventOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
56
- * @returns {Promise<LabEvent | undefined>} Resolves to an Event or `undefined` on failure.
56
+ * @returns {Promise<LabEventsEvent | undefined>} Resolves to an Event or `undefined` on failure.
57
57
  */
58
58
  async fetchEventV1(eventId, options) {
59
59
  return this.fetchResource(`v1/internal/event/${eventId}`, { params: options });
@@ -65,7 +65,7 @@ let EventsService = class EventsService extends base_http_service_1.BaseHttpServ
65
65
  * Returns an empty array if the downstream service call fails.
66
66
  *
67
67
  * @param {FetchEventOptionsDtoV1} [options] - Optional filter options for narrowing results.
68
- * @returns {Promise<LabEvent[]>} Resolves to a list of events, or an empty array if none found.
68
+ * @returns {Promise<LabEventsEvent[]>} Resolves to a list of events, or an empty array if none found.
69
69
  */
70
70
  async fetchEventCollectionV1(options) {
71
71
  return this.fetchResourceCollection(`v1/internal/events`, { params: options });
@@ -1,30 +1,10 @@
1
1
  import { ConfigService } from '@nestjs/config';
2
+ import { LabFilesFile, LabFilesFolder } from 'itlab-functions';
2
3
  import { AuthenticationModuleOptions } from '../../../authentication';
3
4
  import { BaseHttpService } from '../../base-http.service';
4
5
  import { CropImageOptionsDtoV1 } from './crop-image-options.dto.v1.type';
5
6
  import { FetchFileOptionsDtoV1 } from './fetch-file-options.dto.v1.type';
6
7
  import { FetchFolderOptionsDtoV1 } from './fetch-folder-options.dto.v1.type';
7
- type LabFile = {
8
- id: string;
9
- _url: string;
10
- folderId?: string;
11
- name: string;
12
- tags: string[];
13
- extension: string;
14
- mimetype: string;
15
- type: string;
16
- size: number;
17
- };
18
- type LabFolder = {
19
- id: string;
20
- _url: string;
21
- parentId?: string;
22
- name: string;
23
- fileIds: string[];
24
- size: number;
25
- files?: LabFile[];
26
- folders?: LabFolder[];
27
- };
28
8
  /**
29
9
  * FilesService
30
10
  *
@@ -55,9 +35,9 @@ export declare class FilesService extends BaseHttpService {
55
35
  *
56
36
  * @param {string} fileId - Unique MongoDB identifier of the file.
57
37
  * @param {FetchFileOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
58
- * @returns {Promise<LabFile | undefined>} Resolves to an File or `undefined` on failure.
38
+ * @returns {Promise<LabFilesFile | undefined>} Resolves to an File or `undefined` on failure.
59
39
  */
60
- fetchFileV1(fileId: string, options?: FetchFileOptionsDtoV1): Promise<LabFile | undefined>;
40
+ fetchFileV1(fileId: string, options?: FetchFileOptionsDtoV1): Promise<LabFilesFile | undefined>;
61
41
  /**
62
42
  * Retrieves a collection of file ids.
63
43
  *
@@ -75,9 +55,9 @@ export declare class FilesService extends BaseHttpService {
75
55
  * Returns an empty array if the downstream service call fails.
76
56
  *
77
57
  * @param {FetchFileOptionsDtoV1} [options] - Optional filter options for narrowing results.
78
- * @returns {Promise<LabFile[]>} Resolves to a list of files, or an empty array if none found.
58
+ * @returns {Promise<LabFilesFile[]>} Resolves to a list of files, or an empty array if none found.
79
59
  */
80
- fetchFileCollectionV1(options?: FetchFileOptionsDtoV1): Promise<LabFile[]>;
60
+ fetchFileCollectionV1(options?: FetchFileOptionsDtoV1): Promise<LabFilesFile[]>;
81
61
  /**
82
62
  * Retrieves a single folder entry by its MongoDB identifier.
83
63
  *
@@ -86,9 +66,9 @@ export declare class FilesService extends BaseHttpService {
86
66
  *
87
67
  * @param {string} folderId - Unique MongoDB identifier of the folder.
88
68
  * @param {FetchFolderOptionsDtoV1} [options] - Optional query parameters for filtering or projection.
89
- * @returns {Promise<LabFolder | undefined>} Resolves to an Folder or `undefined` on failure.
69
+ * @returns {Promise<LabFilesFolder | undefined>} Resolves to an Folder or `undefined` on failure.
90
70
  */
91
- fetchFolderV1(folderId: string, options?: FetchFolderOptionsDtoV1): Promise<LabFolder | undefined>;
71
+ fetchFolderV1(folderId: string, options?: FetchFolderOptionsDtoV1): Promise<LabFilesFolder | undefined>;
92
72
  /**
93
73
  * Retrieves a collection of folder entries.
94
74
  *
@@ -96,11 +76,10 @@ export declare class FilesService extends BaseHttpService {
96
76
  * Returns an empty array if the downstream service call fails.
97
77
  *
98
78
  * @param {FetchFolderOptionsDtoV1} [options] - Optional filter options for narrowing results.
99
- * @returns {Promise<LabFolder[]>} Resolves to a list of folders, or an empty array if none found.
79
+ * @returns {Promise<LabFilesFolder[]>} Resolves to a list of folders, or an empty array if none found.
100
80
  */
101
- fetchFolderCollectionV1(options?: FetchFolderOptionsDtoV1): Promise<LabFolder[]>;
81
+ fetchFolderCollectionV1(options?: FetchFolderOptionsDtoV1): Promise<LabFilesFolder[]>;
102
82
  uploadAvatarV1(accountId: string, avatar: File): Promise<void>;
103
83
  deleteAvatarV1(accountId: string): Promise<void>;
104
84
  cropImageV1(image: File, options?: CropImageOptionsDtoV1): Promise<Buffer>;
105
85
  }
106
- export {};