@feresmeryas/microservices-common 1.3.0 → 1.5.0

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.
@@ -0,0 +1,15 @@
1
+ export declare class CommentFields {
2
+ id?: boolean;
3
+ postId?: boolean;
4
+ authorId?: boolean;
5
+ authorFullName?: boolean;
6
+ authorProfilePictureUrl?: boolean;
7
+ content?: boolean;
8
+ parentCommentId?: boolean;
9
+ depth?: boolean;
10
+ likesCount?: boolean;
11
+ repliesCount?: boolean;
12
+ isEdited?: boolean;
13
+ createdAt?: boolean;
14
+ updatedAt?: boolean;
15
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CommentFields = void 0;
4
+ class CommentFields {
5
+ }
6
+ exports.CommentFields = CommentFields;
7
+ //# sourceMappingURL=comment_fields.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment_fields.dto.js","sourceRoot":"","sources":["../../../dto/comments/comment_fields.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,aAAa;CAczB;AAdD,sCAcC"}
@@ -0,0 +1,15 @@
1
+ export declare class CommentResponseDto {
2
+ id: string;
3
+ postId: string;
4
+ authorId: string;
5
+ authorFullName: string;
6
+ authorProfilePictureUrl: string | null;
7
+ content: string;
8
+ parentCommentId: string | null;
9
+ depth: number;
10
+ likesCount: number;
11
+ repliesCount: number;
12
+ isEdited: boolean;
13
+ createdAt: Date;
14
+ updatedAt: Date;
15
+ }
@@ -0,0 +1,72 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CommentResponseDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ class CommentResponseDto {
15
+ }
16
+ exports.CommentResponseDto = CommentResponseDto;
17
+ __decorate([
18
+ (0, swagger_1.ApiProperty)({ example: "123e4567-e89b-12d3-a456-426614174000" }),
19
+ __metadata("design:type", String)
20
+ ], CommentResponseDto.prototype, "id", void 0);
21
+ __decorate([
22
+ (0, swagger_1.ApiProperty)({ example: "123e4567-e89b-12d3-a456-426614174001" }),
23
+ __metadata("design:type", String)
24
+ ], CommentResponseDto.prototype, "postId", void 0);
25
+ __decorate([
26
+ (0, swagger_1.ApiProperty)({ example: "123e4567-e89b-12d3-a456-426614174002" }),
27
+ __metadata("design:type", String)
28
+ ], CommentResponseDto.prototype, "authorId", void 0);
29
+ __decorate([
30
+ (0, swagger_1.ApiProperty)({ example: "John Doe" }),
31
+ __metadata("design:type", String)
32
+ ], CommentResponseDto.prototype, "authorFullName", void 0);
33
+ __decorate([
34
+ (0, swagger_1.ApiProperty)({ example: "https://example.com/profile.jpg", nullable: true }),
35
+ __metadata("design:type", String)
36
+ ], CommentResponseDto.prototype, "authorProfilePictureUrl", void 0);
37
+ __decorate([
38
+ (0, swagger_1.ApiProperty)({ example: "Great post!" }),
39
+ __metadata("design:type", String)
40
+ ], CommentResponseDto.prototype, "content", void 0);
41
+ __decorate([
42
+ (0, swagger_1.ApiProperty)({
43
+ example: "123e4567-e89b-12d3-a456-426614174003",
44
+ nullable: true,
45
+ }),
46
+ __metadata("design:type", String)
47
+ ], CommentResponseDto.prototype, "parentCommentId", void 0);
48
+ __decorate([
49
+ (0, swagger_1.ApiProperty)({ example: 0 }),
50
+ __metadata("design:type", Number)
51
+ ], CommentResponseDto.prototype, "depth", void 0);
52
+ __decorate([
53
+ (0, swagger_1.ApiProperty)({ example: 5 }),
54
+ __metadata("design:type", Number)
55
+ ], CommentResponseDto.prototype, "likesCount", void 0);
56
+ __decorate([
57
+ (0, swagger_1.ApiProperty)({ example: 2 }),
58
+ __metadata("design:type", Number)
59
+ ], CommentResponseDto.prototype, "repliesCount", void 0);
60
+ __decorate([
61
+ (0, swagger_1.ApiProperty)({ example: false }),
62
+ __metadata("design:type", Boolean)
63
+ ], CommentResponseDto.prototype, "isEdited", void 0);
64
+ __decorate([
65
+ (0, swagger_1.ApiProperty)({ example: "2024-01-15T10:30:00Z" }),
66
+ __metadata("design:type", Date)
67
+ ], CommentResponseDto.prototype, "createdAt", void 0);
68
+ __decorate([
69
+ (0, swagger_1.ApiProperty)({ example: "2024-01-15T10:30:00Z" }),
70
+ __metadata("design:type", Date)
71
+ ], CommentResponseDto.prototype, "updatedAt", void 0);
72
+ //# sourceMappingURL=comment_response.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment_response.dto.js","sourceRoot":"","sources":["../../../dto/comments/comment_response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAE9C,MAAa,kBAAkB;CA0C9B;AA1CD,gDA0CC;AAxCC;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC;;8CACtD;AAGX;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC;;kDAClD;AAGf;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC;;oDAChD;AAGjB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;;0DACd;AAGvB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,iCAAiC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mEACrC;AAGvC;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;;mDACxB;AAMhB;IAJC,IAAA,qBAAW,EAAC;QACX,OAAO,EAAE,sCAAsC;QAC/C,QAAQ,EAAE,IAAI;KACf,CAAC;;2DAC6B;AAG/B;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;iDACd;AAGd;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;sDACT;AAGnB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;wDACP;AAGrB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;oDACd;AAGlB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;8BACtC,IAAI;qDAAC;AAGhB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;8BACtC,IAAI;qDAAC"}
@@ -0,0 +1,4 @@
1
+ import { CommentResponseDto } from "./comment_response.dto";
2
+ export declare class CommentTreeDto extends CommentResponseDto {
3
+ replies: CommentTreeDto[];
4
+ }
@@ -0,0 +1,22 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CommentTreeDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const comment_response_dto_1 = require("./comment_response.dto");
15
+ class CommentTreeDto extends comment_response_dto_1.CommentResponseDto {
16
+ }
17
+ exports.CommentTreeDto = CommentTreeDto;
18
+ __decorate([
19
+ (0, swagger_1.ApiProperty)({ type: [CommentTreeDto] }),
20
+ __metadata("design:type", Array)
21
+ ], CommentTreeDto.prototype, "replies", void 0);
22
+ //# sourceMappingURL=comment_tree.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment_tree.dto.js","sourceRoot":"","sources":["../../../dto/comments/comment_tree.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,iEAA4D;AAE5D,MAAa,cAAe,SAAQ,yCAAkB;CAGrD;AAHD,wCAGC;AADC;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC;;+CACd"}
@@ -0,0 +1,5 @@
1
+ export declare class CreateCommentDto {
2
+ postId: string;
3
+ content: string;
4
+ parentCommentId?: string;
5
+ }
@@ -0,0 +1,50 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CreateCommentDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_validator_1 = require("class-validator");
15
+ class CreateCommentDto {
16
+ }
17
+ exports.CreateCommentDto = CreateCommentDto;
18
+ __decorate([
19
+ (0, swagger_1.ApiProperty)({
20
+ description: "Post ID to comment on",
21
+ example: "123e4567-e89b-12d3-a456-426614174000",
22
+ }),
23
+ (0, class_validator_1.IsUUID)(),
24
+ (0, class_validator_1.IsNotEmpty)(),
25
+ __metadata("design:type", String)
26
+ ], CreateCommentDto.prototype, "postId", void 0);
27
+ __decorate([
28
+ (0, swagger_1.ApiProperty)({
29
+ description: "Comment content",
30
+ example: "Great post!",
31
+ minLength: 1,
32
+ maxLength: 5000,
33
+ }),
34
+ (0, class_validator_1.IsString)(),
35
+ (0, class_validator_1.IsNotEmpty)(),
36
+ (0, class_validator_1.MinLength)(1),
37
+ (0, class_validator_1.MaxLength)(5000),
38
+ __metadata("design:type", String)
39
+ ], CreateCommentDto.prototype, "content", void 0);
40
+ __decorate([
41
+ (0, swagger_1.ApiProperty)({
42
+ description: "Parent comment ID for nested replies",
43
+ example: "123e4567-e89b-12d3-a456-426614174002",
44
+ required: false,
45
+ }),
46
+ (0, class_validator_1.IsUUID)(),
47
+ (0, class_validator_1.IsOptional)(),
48
+ __metadata("design:type", String)
49
+ ], CreateCommentDto.prototype, "parentCommentId", void 0);
50
+ //# sourceMappingURL=create_comment.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create_comment.dto.js","sourceRoot":"","sources":["../../../dto/comments/create_comment.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAOyB;AAEzB,MAAa,gBAAgB;CA6B5B;AA7BD,4CA6BC;AAtBC;IANC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,uBAAuB;QACpC,OAAO,EAAE,sCAAsC;KAChD,CAAC;IACD,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;gDACE;AAYf;IAVC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,iBAAiB;QAC9B,OAAO,EAAE,aAAa;QACtB,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,IAAI;KAChB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,2BAAS,EAAC,IAAI,CAAC;;iDACA;AAShB;IAPC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,sCAAsC;QACnD,OAAO,EAAE,sCAAsC;QAC/C,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;yDACY"}
@@ -0,0 +1,7 @@
1
+ import { CommentResponseDto } from "./comment_response.dto";
2
+ export declare class PaginatedCommentsDto {
3
+ comments: CommentResponseDto[];
4
+ total: number;
5
+ page: number;
6
+ totalPages: number;
7
+ }
@@ -0,0 +1,34 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.PaginatedCommentsDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const comment_response_dto_1 = require("./comment_response.dto");
15
+ class PaginatedCommentsDto {
16
+ }
17
+ exports.PaginatedCommentsDto = PaginatedCommentsDto;
18
+ __decorate([
19
+ (0, swagger_1.ApiProperty)({ type: [comment_response_dto_1.CommentResponseDto] }),
20
+ __metadata("design:type", Array)
21
+ ], PaginatedCommentsDto.prototype, "comments", void 0);
22
+ __decorate([
23
+ (0, swagger_1.ApiProperty)({ example: 50 }),
24
+ __metadata("design:type", Number)
25
+ ], PaginatedCommentsDto.prototype, "total", void 0);
26
+ __decorate([
27
+ (0, swagger_1.ApiProperty)({ example: 1 }),
28
+ __metadata("design:type", Number)
29
+ ], PaginatedCommentsDto.prototype, "page", void 0);
30
+ __decorate([
31
+ (0, swagger_1.ApiProperty)({ example: 5 }),
32
+ __metadata("design:type", Number)
33
+ ], PaginatedCommentsDto.prototype, "totalPages", void 0);
34
+ //# sourceMappingURL=paginated_comment.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginated_comment.dto.js","sourceRoot":"","sources":["../../../dto/comments/paginated_comment.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,iEAA4D;AAE5D,MAAa,oBAAoB;CAYhC;AAZD,oDAYC;AAVC;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,CAAC,yCAAkB,CAAC,EAAE,CAAC;;sDACb;AAG/B;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;mDACf;AAGd;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;kDACf;AAGb;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;wDACT"}
@@ -0,0 +1,3 @@
1
+ export declare class UpdateCommentDto {
2
+ content: string;
3
+ }
@@ -0,0 +1,31 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UpdateCommentDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_validator_1 = require("class-validator");
15
+ class UpdateCommentDto {
16
+ }
17
+ exports.UpdateCommentDto = UpdateCommentDto;
18
+ __decorate([
19
+ (0, swagger_1.ApiProperty)({
20
+ description: "Updated comment content",
21
+ example: "Updated: Great post!",
22
+ minLength: 1,
23
+ maxLength: 5000,
24
+ }),
25
+ (0, class_validator_1.IsString)(),
26
+ (0, class_validator_1.IsNotEmpty)(),
27
+ (0, class_validator_1.MinLength)(1),
28
+ (0, class_validator_1.MaxLength)(5000),
29
+ __metadata("design:type", String)
30
+ ], UpdateCommentDto.prototype, "content", void 0);
31
+ //# sourceMappingURL=update_comment.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update_comment.dto.js","sourceRoot":"","sources":["../../../dto/comments/update_comment.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAA6E;AAE7E,MAAa,gBAAgB;CAY5B;AAZD,4CAYC;AADC;IAVC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,yBAAyB;QACtC,OAAO,EAAE,sBAAsB;QAC/B,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,IAAI;KAChB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,2BAAS,EAAC,IAAI,CAAC;;iDACA"}
@@ -6,6 +6,7 @@ export declare class PostFields {
6
6
  publisherProfilePictureUrl?: boolean;
7
7
  commentsCount?: boolean;
8
8
  likesCount?: boolean;
9
+ hidden?: boolean;
9
10
  files?: boolean;
10
11
  createdAt?: boolean;
11
12
  updatedAt?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"post_fields.dto.js","sourceRoot":"","sources":["../../../dto/posts/post_fields.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,UAAU;CAWtB;AAXD,gCAWC"}
1
+ {"version":3,"file":"post_fields.dto.js","sourceRoot":"","sources":["../../../dto/posts/post_fields.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,UAAU;CAYtB;AAZD,gCAYC"}