@feresmeryas/microservices-common 1.3.0 → 1.5.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/dto/comments/comment_fields.dto.d.ts +15 -0
- package/dist/dto/comments/comment_fields.dto.js +7 -0
- package/dist/dto/comments/comment_fields.dto.js.map +1 -0
- package/dist/dto/comments/comment_response.dto.d.ts +15 -0
- package/dist/dto/comments/comment_response.dto.js +72 -0
- package/dist/dto/comments/comment_response.dto.js.map +1 -0
- package/dist/dto/comments/comment_tree.dto.d.ts +4 -0
- package/dist/dto/comments/comment_tree.dto.js +22 -0
- package/dist/dto/comments/comment_tree.dto.js.map +1 -0
- package/dist/dto/comments/create_comment.dto.d.ts +5 -0
- package/dist/dto/comments/create_comment.dto.js +50 -0
- package/dist/dto/comments/create_comment.dto.js.map +1 -0
- package/dist/dto/comments/paginated_comment.dto.d.ts +7 -0
- package/dist/dto/comments/paginated_comment.dto.js +34 -0
- package/dist/dto/comments/paginated_comment.dto.js.map +1 -0
- package/dist/dto/comments/update_comment.dto.d.ts +3 -0
- package/dist/dto/comments/update_comment.dto.js +31 -0
- package/dist/dto/comments/update_comment.dto.js.map +1 -0
- package/dist/dto/posts/post_response_self.dto.d.ts +15 -0
- package/dist/dto/posts/post_response_self.dto.js +63 -0
- package/dist/dto/posts/post_response_self.dto.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -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 @@
|
|
|
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,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,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,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,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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PostFileDto } from "./post_file.dto";
|
|
2
|
+
import { PostResponseDto } from "./post_response.dto";
|
|
3
|
+
export declare class PostResponseSelfDto extends PostResponseDto {
|
|
4
|
+
id: string;
|
|
5
|
+
publisherId: string;
|
|
6
|
+
description: string;
|
|
7
|
+
publisherFullName: string;
|
|
8
|
+
publisherProfilePictureUrl: string | null;
|
|
9
|
+
files: PostFileDto[];
|
|
10
|
+
commentsCount: number;
|
|
11
|
+
likesCount: number;
|
|
12
|
+
hidden: boolean;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
updatedAt: Date;
|
|
15
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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.PostResponseSelfDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const post_file_dto_1 = require("./post_file.dto");
|
|
15
|
+
const post_response_dto_1 = require("./post_response.dto");
|
|
16
|
+
class PostResponseSelfDto extends post_response_dto_1.PostResponseDto {
|
|
17
|
+
}
|
|
18
|
+
exports.PostResponseSelfDto = PostResponseSelfDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, swagger_1.ApiProperty)({ example: "123e4567-e89b-12d3-a456-426614174000" }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], PostResponseSelfDto.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, swagger_1.ApiProperty)({ example: "123e4567-e89b-12d3-a456-426614174001" }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], PostResponseSelfDto.prototype, "publisherId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, swagger_1.ApiProperty)({ example: "Check out this amazing view!" }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], PostResponseSelfDto.prototype, "description", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({ example: "John Doe" }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], PostResponseSelfDto.prototype, "publisherFullName", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, swagger_1.ApiProperty)({ example: "https://example.com/profile.jpg", nullable: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], PostResponseSelfDto.prototype, "publisherProfilePictureUrl", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, swagger_1.ApiProperty)({ type: [post_file_dto_1.PostFileDto] }),
|
|
41
|
+
__metadata("design:type", Array)
|
|
42
|
+
], PostResponseSelfDto.prototype, "files", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, swagger_1.ApiProperty)({ example: 42 }),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], PostResponseSelfDto.prototype, "commentsCount", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, swagger_1.ApiProperty)({ example: 128 }),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], PostResponseSelfDto.prototype, "likesCount", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, swagger_1.ApiProperty)({ example: true }),
|
|
53
|
+
__metadata("design:type", Boolean)
|
|
54
|
+
], PostResponseSelfDto.prototype, "hidden", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, swagger_1.ApiProperty)({ example: "2024-01-15T10:30:00Z" }),
|
|
57
|
+
__metadata("design:type", Date)
|
|
58
|
+
], PostResponseSelfDto.prototype, "createdAt", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, swagger_1.ApiProperty)({ example: "2024-01-15T10:30:00Z" }),
|
|
61
|
+
__metadata("design:type", Date)
|
|
62
|
+
], PostResponseSelfDto.prototype, "updatedAt", void 0);
|
|
63
|
+
//# sourceMappingURL=post_response_self.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post_response_self.dto.js","sourceRoot":"","sources":["../../../dto/posts/post_response_self.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,mDAA8C;AAC9C,2DAAsD;AAEtD,MAAa,mBAAoB,SAAQ,mCAAe;CAiCvD;AAjCD,kDAiCC;AA/BC;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC;;+CACtD;AAGX;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC;;wDAC7C;AAGpB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;;wDACrC;AAGpB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;;8DACX;AAG1B;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,iCAAiC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uEAClC;AAG1C;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,CAAC,2BAAW,CAAC,EAAE,CAAC;;kDAChB;AAGrB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;0DACP;AAGtB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;;uDACX;AAGnB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;mDACf;AAGhB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;8BACtC,IAAI;sDAAC;AAGhB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;8BACtC,IAAI;sDAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -23,3 +23,9 @@ export * from "./dto/posts/pagination_post.dto";
|
|
|
23
23
|
export * from "./dto/posts/update_post.dto";
|
|
24
24
|
export * from "./dto/posts/post_file.dto";
|
|
25
25
|
export * from "./dto/posts/post_fields.dto";
|
|
26
|
+
export * from "./dto/posts/post_response_self.dto";
|
|
27
|
+
export * from "./dto/comments/create_comment.dto";
|
|
28
|
+
export * from "./dto/comments/comment_response.dto";
|
|
29
|
+
export * from "./dto/comments/comment_tree.dto";
|
|
30
|
+
export * from "./dto/comments/paginated_comment.dto";
|
|
31
|
+
export * from "./dto/comments/update_comment.dto";
|
package/dist/index.js
CHANGED
|
@@ -39,4 +39,10 @@ __exportStar(require("./dto/posts/pagination_post.dto"), exports);
|
|
|
39
39
|
__exportStar(require("./dto/posts/update_post.dto"), exports);
|
|
40
40
|
__exportStar(require("./dto/posts/post_file.dto"), exports);
|
|
41
41
|
__exportStar(require("./dto/posts/post_fields.dto"), exports);
|
|
42
|
+
__exportStar(require("./dto/posts/post_response_self.dto"), exports);
|
|
43
|
+
__exportStar(require("./dto/comments/create_comment.dto"), exports);
|
|
44
|
+
__exportStar(require("./dto/comments/comment_response.dto"), exports);
|
|
45
|
+
__exportStar(require("./dto/comments/comment_tree.dto"), exports);
|
|
46
|
+
__exportStar(require("./dto/comments/paginated_comment.dto"), exports);
|
|
47
|
+
__exportStar(require("./dto/comments/update_comment.dto"), exports);
|
|
42
48
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,uEAAqD;AACrD,8DAA4C;AAC5C,iEAA+C;AAC/C,+DAA6C;AAC7C,kEAAgD;AAChD,8DAA4C;AAC5C,iEAA+C;AAC/C,8DAA4C;AAC5C,kEAAgD;AAChD,gEAA8C;AAC9C,4EAA0D;AAE1D,gEAA8C;AAC9C,kEAAgD;AAChD,gEAA8C;AAE9C,mEAAiD;AACjD,wEAAsD;AACtD,mEAAiD;AAEjD,8DAA4C;AAC5C,oEAAkD;AAClD,gEAA8C;AAC9C,kEAAgD;AAChD,8DAA4C;AAC5C,4DAA0C;AAC1C,8DAA4C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,uEAAqD;AACrD,8DAA4C;AAC5C,iEAA+C;AAC/C,+DAA6C;AAC7C,kEAAgD;AAChD,8DAA4C;AAC5C,iEAA+C;AAC/C,8DAA4C;AAC5C,kEAAgD;AAChD,gEAA8C;AAC9C,4EAA0D;AAE1D,gEAA8C;AAC9C,kEAAgD;AAChD,gEAA8C;AAE9C,mEAAiD;AACjD,wEAAsD;AACtD,mEAAiD;AAEjD,8DAA4C;AAC5C,oEAAkD;AAClD,gEAA8C;AAC9C,kEAAgD;AAChD,8DAA4C;AAC5C,4DAA0C;AAC1C,8DAA4C;AAC5C,qEAAmD;AAEnD,oEAAkD;AAClD,sEAAoD;AACpD,kEAAgD;AAChD,uEAAqD;AACrD,oEAAkD"}
|