itlab-internal-services 2.16.0 → 2.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classes/document-merger.class.js +2 -1
- package/dist/classes/index.d.ts +3 -1
- package/dist/classes/index.js +5 -3
- package/dist/classes/schema-builder.class.d.ts +75 -0
- package/dist/classes/schema-builder.class.js +109 -0
- package/dist/classes/task-manager.class.d.ts +71 -0
- package/dist/classes/task-manager.class.js +99 -0
- package/dist/exceptions/bad-parameter.exception.js +2 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/interceptors/attribute-sanitizer.interceptor.d.ts +68 -0
- package/dist/interceptors/attribute-sanitizer.interceptor.js +154 -0
- package/dist/interceptors/index.d.ts +1 -0
- package/dist/interceptors/index.js +17 -0
- package/dist/middleware/http-logging.middleware.d.ts +19 -0
- package/dist/middleware/http-logging.middleware.js +50 -0
- package/dist/middleware/index.d.ts +1 -0
- package/dist/middleware/index.js +17 -0
- package/dist/modules/authentication/guards/jwt-auth.guard.js +1 -7
- package/dist/modules/authentication/guards/permissions.guard.js +4 -3
- package/dist/modules/authentication/guards/service-auth.guard.js +1 -1
- package/dist/modules/comment/comment-module-options.interface.d.ts +2 -2
- package/dist/modules/comment/comment.controller.d.ts +5 -5
- package/dist/modules/comment/comment.controller.js +3 -3
- package/dist/modules/comment/comment.service.d.ts +3 -3
- package/dist/modules/comment/comment.service.js +1 -1
- package/dist/modules/like/like-module-options.interface.d.ts +2 -2
- package/dist/modules/like/like.controller.d.ts +2 -2
- package/dist/modules/like/like.controller.js +2 -2
- package/dist/modules/services/providers/accounts.service.js +2 -0
- package/dist/modules/services/providers/books.service.js +2 -0
- package/dist/modules/services/providers/changelog.service.js +2 -0
- package/dist/modules/services/providers/comments/comments.service.d.ts +3 -3
- package/dist/modules/services/providers/comments/comments.service.js +2 -1
- package/dist/modules/services/providers/content/{content-types.d.ts → content-return-types.d.ts} +3 -4
- package/dist/modules/services/providers/content/{content-types.js → content-return-types.js} +2 -2
- package/dist/modules/services/providers/content/content.service.d.ts +7 -5
- package/dist/modules/services/providers/content/content.service.js +29 -12
- package/dist/modules/services/providers/content/index.d.ts +1 -0
- package/dist/modules/services/providers/demo-hive.service.js +2 -0
- package/dist/modules/services/providers/events.service.js +2 -0
- package/dist/modules/services/providers/hackschool.service.js +2 -0
- package/dist/modules/services/providers/ideas.service.js +2 -0
- package/dist/modules/services/providers/lunch-roulette.service.js +2 -0
- package/dist/modules/services/providers/mail/mail.service.js +1 -1
- package/dist/modules/services/providers/newletter.service.js +2 -0
- package/dist/modules/services/providers/newsroom.service.js +2 -0
- package/dist/modules/services/providers/podcasts.service.js +2 -0
- package/dist/modules/services/providers/search/search.service.js +1 -1
- package/dist/modules/services/providers/team.service.js +2 -0
- package/dist/modules/services/providers/tech-radar.service.js +2 -0
- package/dist/properties/content-return-type.property.d.ts +7 -0
- package/dist/properties/content-return-type.property.js +22 -0
- package/dist/properties/index.d.ts +3 -0
- package/dist/properties/index.js +7 -1
- package/dist/properties/likeable.properties.d.ts +1 -0
- package/dist/properties/likeable.properties.js +66 -0
- package/dist/properties/viewable.properties.d.ts +1 -0
- package/dist/properties/viewable.properties.js +66 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +18 -0
- package/dist/types/likeable.type.d.ts +15 -0
- package/dist/types/likeable.type.js +2 -0
- package/dist/types/viewable.type.d.ts +15 -0
- package/dist/types/viewable.type.js +2 -0
- package/package.json +2 -2
- package/dist/classes/document-updater.class.d.ts +0 -39
- package/dist/classes/document-updater.class.js +0 -57
- package/dist/http-logger.middleware.d.ts +0 -12
- package/dist/http-logger.middleware.js +0 -43
- package/dist/likeable.interface.d.ts +0 -41
- package/dist/likeable.interface.js +0 -48
- package/dist/viewable.interface.d.ts +0 -41
- package/dist/viewable.interface.js +0 -48
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PropertyLikedBy = PropertyLikedBy;
|
|
4
|
-
exports.ApiLikedBy = ApiLikedBy;
|
|
5
|
-
exports.ApiLikes = ApiLikes;
|
|
6
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
7
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
8
|
-
const models_1 = require("./models");
|
|
9
|
-
/**
|
|
10
|
-
* Mongoose property decorator for defining the `_likedBy` field.
|
|
11
|
-
* This field is required and initialized with an empty array to ensure consistency.
|
|
12
|
-
*
|
|
13
|
-
* Useful for tracking which accounts have liked a particular document.
|
|
14
|
-
*
|
|
15
|
-
* @returns {PropertyDecorator} - Mongoose property configuration for `_likedBy`.
|
|
16
|
-
*/
|
|
17
|
-
function PropertyLikedBy() {
|
|
18
|
-
return (0, mongoose_1.Prop)({ required: true, default: () => [] });
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Swagger property decorator for documenting the `_likedBy` field in API specs.
|
|
22
|
-
* Describes the field as an array of `Account` and documents its usage.
|
|
23
|
-
*
|
|
24
|
-
* This improves visibility in auto-generated API docs for consumers of likeable entities.
|
|
25
|
-
*
|
|
26
|
-
* @returns {PropertyDecorator} - Swagger metadata for the `_likedBy` field.
|
|
27
|
-
*/
|
|
28
|
-
function ApiLikedBy() {
|
|
29
|
-
return (0, swagger_1.ApiProperty)({
|
|
30
|
-
name: 'likedBy',
|
|
31
|
-
type: [models_1.Account],
|
|
32
|
-
default: [],
|
|
33
|
-
description: 'The accounts who have liked the entity.',
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Swagger property decorator for documenting the `likes` field in API responses.
|
|
38
|
-
* Represents the total number of likes and helps clarify it is derived/cached.
|
|
39
|
-
*
|
|
40
|
-
* @returns {PropertyDecorator} - Swagger metadata for the `likes` field.
|
|
41
|
-
*/
|
|
42
|
-
function ApiLikes() {
|
|
43
|
-
return (0, swagger_1.ApiProperty)({
|
|
44
|
-
type: Number,
|
|
45
|
-
default: 0,
|
|
46
|
-
description: 'The number of likes this entity has received.',
|
|
47
|
-
});
|
|
48
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interface for entities that track user views. This allows the system to monitor
|
|
3
|
-
* which accounts have viewed an item and how many total views it has received.
|
|
4
|
-
*
|
|
5
|
-
* Used to enable features such as view analytics, popularity ranking, or recommendation systems.
|
|
6
|
-
*/
|
|
7
|
-
export interface Viewable {
|
|
8
|
-
/**
|
|
9
|
-
* List of account IDs who have viewed this entity.
|
|
10
|
-
*/
|
|
11
|
-
_viewedBy: string[];
|
|
12
|
-
/**
|
|
13
|
-
* Count of total views.
|
|
14
|
-
*/
|
|
15
|
-
views: number;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Mongoose schema decorator for the `_viewedBy` field, which tracks unique viewer IDs.
|
|
19
|
-
* Initialized as an empty array to ensure a consistent schema across documents.
|
|
20
|
-
*
|
|
21
|
-
* @returns {PropertyDecorator} - Mongoose configuration for tracking viewers.
|
|
22
|
-
*/
|
|
23
|
-
export declare function PropertyViewedBy(): PropertyDecorator;
|
|
24
|
-
/**
|
|
25
|
-
* Swagger schema decorator for the `_viewedBy` field. Used in OpenAPI documentation
|
|
26
|
-
* to describe which users have viewed the entity.
|
|
27
|
-
*
|
|
28
|
-
* It enhances API clarity for clients consuming entities that support view tracking.
|
|
29
|
-
*
|
|
30
|
-
* @returns {PropertyDecorator} - Swagger metadata for the `viewedBy` field.
|
|
31
|
-
*/
|
|
32
|
-
export declare function ApiViewedBy(): PropertyDecorator;
|
|
33
|
-
/**
|
|
34
|
-
* Swagger schema decorator for the `views` field. Communicates to API consumers
|
|
35
|
-
* the meaning and default value of the view count.
|
|
36
|
-
*
|
|
37
|
-
* Helps visualize popularity or engagement metrics in API tooling.
|
|
38
|
-
*
|
|
39
|
-
* @returns {PropertyDecorator} - Swagger metadata for the `views` field.
|
|
40
|
-
*/
|
|
41
|
-
export declare function ApiViews(): PropertyDecorator;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PropertyViewedBy = PropertyViewedBy;
|
|
4
|
-
exports.ApiViewedBy = ApiViewedBy;
|
|
5
|
-
exports.ApiViews = ApiViews;
|
|
6
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
7
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
8
|
-
const models_1 = require("./models");
|
|
9
|
-
/**
|
|
10
|
-
* Mongoose schema decorator for the `_viewedBy` field, which tracks unique viewer IDs.
|
|
11
|
-
* Initialized as an empty array to ensure a consistent schema across documents.
|
|
12
|
-
*
|
|
13
|
-
* @returns {PropertyDecorator} - Mongoose configuration for tracking viewers.
|
|
14
|
-
*/
|
|
15
|
-
function PropertyViewedBy() {
|
|
16
|
-
return (0, mongoose_1.Prop)({ required: true, default: () => [] });
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Swagger schema decorator for the `_viewedBy` field. Used in OpenAPI documentation
|
|
20
|
-
* to describe which users have viewed the entity.
|
|
21
|
-
*
|
|
22
|
-
* It enhances API clarity for clients consuming entities that support view tracking.
|
|
23
|
-
*
|
|
24
|
-
* @returns {PropertyDecorator} - Swagger metadata for the `viewedBy` field.
|
|
25
|
-
*/
|
|
26
|
-
function ApiViewedBy() {
|
|
27
|
-
return (0, swagger_1.ApiProperty)({
|
|
28
|
-
name: 'viewedBy',
|
|
29
|
-
type: [models_1.Account],
|
|
30
|
-
default: [],
|
|
31
|
-
description: 'Accounts that have viewed this entity.',
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Swagger schema decorator for the `views` field. Communicates to API consumers
|
|
36
|
-
* the meaning and default value of the view count.
|
|
37
|
-
*
|
|
38
|
-
* Helps visualize popularity or engagement metrics in API tooling.
|
|
39
|
-
*
|
|
40
|
-
* @returns {PropertyDecorator} - Swagger metadata for the `views` field.
|
|
41
|
-
*/
|
|
42
|
-
function ApiViews() {
|
|
43
|
-
return (0, swagger_1.ApiProperty)({
|
|
44
|
-
type: Number,
|
|
45
|
-
default: 0,
|
|
46
|
-
description: 'Total number of views this entity has received.',
|
|
47
|
-
});
|
|
48
|
-
}
|