@feresmeryas/microservices-common 1.2.0 → 1.3.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.
- package/dist/dto/posts/create_post._file.dto.d.ts +6 -0
- package/dist/dto/posts/create_post._file.dto.js +56 -0
- package/dist/dto/posts/create_post._file.dto.js.map +1 -0
- package/dist/dto/posts/create_post.dto.d.ts +5 -0
- package/dist/dto/posts/create_post.dto.js +45 -0
- package/dist/dto/posts/create_post.dto.js.map +1 -0
- package/dist/dto/posts/pagination_post.dto.d.ts +7 -0
- package/dist/dto/posts/pagination_post.dto.js +34 -0
- package/dist/dto/posts/pagination_post.dto.js.map +1 -0
- package/dist/dto/posts/post_fields.dto.d.ts +12 -0
- package/dist/dto/posts/post_fields.dto.js +7 -0
- package/dist/dto/posts/post_fields.dto.js.map +1 -0
- package/dist/dto/posts/post_file.dto.d.ts +8 -0
- package/dist/dto/posts/post_file.dto.js +41 -0
- package/dist/dto/posts/post_file.dto.js.map +1 -0
- package/dist/dto/posts/post_response.dto.d.ts +13 -0
- package/dist/dto/posts/post_response.dto.js +58 -0
- package/dist/dto/posts/post_response.dto.js.map +1 -0
- package/dist/dto/posts/update_post.dto.d.ts +3 -0
- package/dist/dto/posts/update_post.dto.js +32 -0
- package/dist/dto/posts/update_post.dto.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,56 @@
|
|
|
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.CreatePostFileDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
class CreatePostFileDto {
|
|
16
|
+
}
|
|
17
|
+
exports.CreatePostFileDto = CreatePostFileDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({
|
|
20
|
+
description: "Base64 encoded file",
|
|
21
|
+
example: "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
|
|
22
|
+
}),
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], CreatePostFileDto.prototype, "fileBuffer", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, swagger_1.ApiProperty)({
|
|
29
|
+
description: "File name",
|
|
30
|
+
example: "vacation-photo.jpg",
|
|
31
|
+
}),
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], CreatePostFileDto.prototype, "fileName", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, swagger_1.ApiProperty)({
|
|
38
|
+
description: "MIME type",
|
|
39
|
+
example: "image/jpeg",
|
|
40
|
+
required: false,
|
|
41
|
+
}),
|
|
42
|
+
(0, class_validator_1.IsString)(),
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], CreatePostFileDto.prototype, "mimeType", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiProperty)({
|
|
48
|
+
description: "File type",
|
|
49
|
+
example: "image",
|
|
50
|
+
enum: ["image", "video"],
|
|
51
|
+
}),
|
|
52
|
+
(0, class_validator_1.IsString)(),
|
|
53
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], CreatePostFileDto.prototype, "fileType", void 0);
|
|
56
|
+
//# sourceMappingURL=create_post._file.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_post._file.dto.js","sourceRoot":"","sources":["../../../dto/posts/create_post._file.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmE;AAEnE,6CAA8C;AAE9C,MAAa,iBAAiB;CAmC7B;AAnCD,8CAmCC;AA3BC;IAPC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,qBAAqB;QAClC,OAAO,EACL,kGAAkG;KACrG,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACM;AAQnB;IANC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,WAAW;QACxB,OAAO,EAAE,oBAAoB;KAC9B,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACI;AASjB;IAPC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,WAAW;QACxB,OAAO,EAAE,YAAY;QACrB,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACK;AASlB;IAPC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,WAAW;QACxB,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;KACzB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACI"}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.CreatePostDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const create_post__file_dto_1 = require("./create_post._file.dto");
|
|
16
|
+
const class_transformer_1 = require("class-transformer");
|
|
17
|
+
class CreatePostDto {
|
|
18
|
+
}
|
|
19
|
+
exports.CreatePostDto = CreatePostDto;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, swagger_1.ApiProperty)({
|
|
22
|
+
description: "Post description/content",
|
|
23
|
+
example: "Check out this amazing view!",
|
|
24
|
+
minLength: 1,
|
|
25
|
+
maxLength: 5000,
|
|
26
|
+
}),
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
29
|
+
(0, class_validator_1.MinLength)(1),
|
|
30
|
+
(0, class_validator_1.MaxLength)(5000),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], CreatePostDto.prototype, "description", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, swagger_1.ApiProperty)({
|
|
35
|
+
description: "Array of files to upload with the post",
|
|
36
|
+
type: [create_post__file_dto_1.CreatePostFileDto],
|
|
37
|
+
required: false,
|
|
38
|
+
}),
|
|
39
|
+
(0, class_validator_1.IsArray)(),
|
|
40
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
41
|
+
(0, class_transformer_1.Type)(() => create_post__file_dto_1.CreatePostFileDto),
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
__metadata("design:type", Array)
|
|
44
|
+
], CreatePostDto.prototype, "files", void 0);
|
|
45
|
+
//# sourceMappingURL=create_post.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_post.dto.js","sourceRoot":"","sources":["../../../dto/posts/create_post.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAQyB;AACzB,mEAA4D;AAC5D,yDAAyC;AAEzC,MAAa,aAAa;CAuBzB;AAvBD,sCAuBC;AAZC;IAVC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,0BAA0B;QACvC,OAAO,EAAE,8BAA8B;QACvC,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;;kDACI;AAWpB;IATC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,wCAAwC;QACrD,IAAI,EAAE,CAAC,yCAAiB,CAAC;QACzB,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,yCAAiB,CAAC;IAC7B,IAAA,4BAAU,GAAE;;4CACe"}
|
|
@@ -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.PaginatedPostsDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const post_response_dto_1 = require("./post_response.dto");
|
|
15
|
+
class PaginatedPostsDto {
|
|
16
|
+
}
|
|
17
|
+
exports.PaginatedPostsDto = PaginatedPostsDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({ type: [post_response_dto_1.PostResponseDto] }),
|
|
20
|
+
__metadata("design:type", Array)
|
|
21
|
+
], PaginatedPostsDto.prototype, "posts", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, swagger_1.ApiProperty)({ example: 100 }),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], PaginatedPostsDto.prototype, "total", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)({ example: 1 }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], PaginatedPostsDto.prototype, "page", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, swagger_1.ApiProperty)({ example: 10 }),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], PaginatedPostsDto.prototype, "totalPages", void 0);
|
|
34
|
+
//# sourceMappingURL=pagination_post.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination_post.dto.js","sourceRoot":"","sources":["../../../dto/posts/pagination_post.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,2DAAsD;AAEtD,MAAa,iBAAiB;CAY7B;AAZD,8CAYC;AAVC;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,CAAC,mCAAe,CAAC,EAAE,CAAC;;gDAChB;AAGzB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;;gDAChB;AAGd;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;+CACf;AAGb;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;qDACV"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class PostFields {
|
|
2
|
+
id?: boolean;
|
|
3
|
+
publisherId?: boolean;
|
|
4
|
+
description?: boolean;
|
|
5
|
+
publisherFullName?: boolean;
|
|
6
|
+
publisherProfilePictureUrl?: boolean;
|
|
7
|
+
commentsCount?: boolean;
|
|
8
|
+
likesCount?: boolean;
|
|
9
|
+
files?: boolean;
|
|
10
|
+
createdAt?: boolean;
|
|
11
|
+
updatedAt?: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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.PostFileDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
class PostFileDto {
|
|
15
|
+
}
|
|
16
|
+
exports.PostFileDto = PostFileDto;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, swagger_1.ApiProperty)({ example: "123e4567-e89b-12d3-a456-426614174000" }),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], PostFileDto.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, swagger_1.ApiProperty)({ example: "https://storage.example.com/posts/image.jpg" }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], PostFileDto.prototype, "fileUrl", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, swagger_1.ApiProperty)({ example: "image", enum: ["image", "video"] }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], PostFileDto.prototype, "fileType", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, swagger_1.ApiProperty)({ example: "image/jpeg", nullable: true }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], PostFileDto.prototype, "mimeType", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, swagger_1.ApiProperty)({ example: 0 }),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], PostFileDto.prototype, "orderIndex", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, swagger_1.ApiProperty)({ example: "2024-01-15T10:30:00Z" }),
|
|
39
|
+
__metadata("design:type", Date)
|
|
40
|
+
], PostFileDto.prototype, "createdAt", void 0);
|
|
41
|
+
//# sourceMappingURL=post_file.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post_file.dto.js","sourceRoot":"","sources":["../../../dto/posts/post_file.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAE9C,MAAa,WAAW;CAkBvB;AAlBD,kCAkBC;AAhBC;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC;;uCACtD;AAGX;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,6CAA6C,EAAE,CAAC;;4CACxD;AAGhB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC;;6CAC3C;AAGjB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CAC/B;AAGxB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;+CACT;AAGnB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;8BACtC,IAAI;8CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PostFileDto } from "./post_file.dto";
|
|
2
|
+
export declare class PostResponseDto {
|
|
3
|
+
id: string;
|
|
4
|
+
publisherId: string;
|
|
5
|
+
description: string;
|
|
6
|
+
publisherFullName: string;
|
|
7
|
+
publisherProfilePictureUrl: string | null;
|
|
8
|
+
files: PostFileDto[];
|
|
9
|
+
commentsCount: number;
|
|
10
|
+
likesCount: number;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
updatedAt: Date;
|
|
13
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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.PostResponseDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const post_file_dto_1 = require("./post_file.dto");
|
|
15
|
+
class PostResponseDto {
|
|
16
|
+
}
|
|
17
|
+
exports.PostResponseDto = PostResponseDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({ example: "123e4567-e89b-12d3-a456-426614174000" }),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], PostResponseDto.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, swagger_1.ApiProperty)({ example: "123e4567-e89b-12d3-a456-426614174001" }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], PostResponseDto.prototype, "publisherId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)({ example: "Check out this amazing view!" }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], PostResponseDto.prototype, "description", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, swagger_1.ApiProperty)({ example: "John Doe" }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], PostResponseDto.prototype, "publisherFullName", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, swagger_1.ApiProperty)({ example: "https://example.com/profile.jpg", nullable: true }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], PostResponseDto.prototype, "publisherProfilePictureUrl", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({ type: [post_file_dto_1.PostFileDto] }),
|
|
40
|
+
__metadata("design:type", Array)
|
|
41
|
+
], PostResponseDto.prototype, "files", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, swagger_1.ApiProperty)({ example: 42 }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], PostResponseDto.prototype, "commentsCount", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiProperty)({ example: 128 }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], PostResponseDto.prototype, "likesCount", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, swagger_1.ApiProperty)({ example: "2024-01-15T10:30:00Z" }),
|
|
52
|
+
__metadata("design:type", Date)
|
|
53
|
+
], PostResponseDto.prototype, "createdAt", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, swagger_1.ApiProperty)({ example: "2024-01-15T10:30:00Z" }),
|
|
56
|
+
__metadata("design:type", Date)
|
|
57
|
+
], PostResponseDto.prototype, "updatedAt", void 0);
|
|
58
|
+
//# sourceMappingURL=post_response.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post_response.dto.js","sourceRoot":"","sources":["../../../dto/posts/post_response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,mDAA8C;AAE9C,MAAa,eAAe;CA8B3B;AA9BD,0CA8BC;AA5BC;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC;;2CACtD;AAGX;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sCAAsC,EAAE,CAAC;;oDAC7C;AAGpB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,8BAA8B,EAAE,CAAC;;oDACrC;AAGpB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;;0DACX;AAG1B;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,iCAAiC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mEAClC;AAG1C;IADC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,CAAC,2BAAW,CAAC,EAAE,CAAC;;8CAChB;AAGrB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;sDACP;AAGtB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;;mDACX;AAGnB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;8BACtC,IAAI;kDAAC;AAGhB;IADC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;8BACtC,IAAI;kDAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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.UpdatePostDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class UpdatePostDto {
|
|
16
|
+
}
|
|
17
|
+
exports.UpdatePostDto = UpdatePostDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({
|
|
20
|
+
description: "Post description/content",
|
|
21
|
+
example: "Updated: Check out this amazing view!",
|
|
22
|
+
minLength: 1,
|
|
23
|
+
maxLength: 5000,
|
|
24
|
+
required: false,
|
|
25
|
+
}),
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
28
|
+
(0, class_validator_1.MinLength)(1),
|
|
29
|
+
(0, class_validator_1.MaxLength)(5000),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], UpdatePostDto.prototype, "description", void 0);
|
|
32
|
+
//# sourceMappingURL=update_post.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update_post.dto.js","sourceRoot":"","sources":["../../../dto/posts/update_post.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAA6E;AAE7E,MAAa,aAAa;CAazB;AAbD,sCAaC;AADC;IAXC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,0BAA0B;QACvC,OAAO,EAAE,uCAAuC;QAChD,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,2BAAS,EAAC,IAAI,CAAC;;kDACI"}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,3 +16,10 @@ export * from "./dto/storage/upload-file.dto";
|
|
|
16
16
|
export * from "./inteface/device_info.interface";
|
|
17
17
|
export * from "./inteface/storage-provider.interface";
|
|
18
18
|
export * from "./inteface/upload-file.interface";
|
|
19
|
+
export * from "./dto/posts/create_post.dto";
|
|
20
|
+
export * from "./dto/posts/create_post._file.dto";
|
|
21
|
+
export * from "./dto/posts/post_response.dto";
|
|
22
|
+
export * from "./dto/posts/pagination_post.dto";
|
|
23
|
+
export * from "./dto/posts/update_post.dto";
|
|
24
|
+
export * from "./dto/posts/post_file.dto";
|
|
25
|
+
export * from "./dto/posts/post_fields.dto";
|
package/dist/index.js
CHANGED
|
@@ -32,4 +32,11 @@ __exportStar(require("./dto/storage/upload-file.dto"), exports);
|
|
|
32
32
|
__exportStar(require("./inteface/device_info.interface"), exports);
|
|
33
33
|
__exportStar(require("./inteface/storage-provider.interface"), exports);
|
|
34
34
|
__exportStar(require("./inteface/upload-file.interface"), exports);
|
|
35
|
+
__exportStar(require("./dto/posts/create_post.dto"), exports);
|
|
36
|
+
__exportStar(require("./dto/posts/create_post._file.dto"), exports);
|
|
37
|
+
__exportStar(require("./dto/posts/post_response.dto"), exports);
|
|
38
|
+
__exportStar(require("./dto/posts/pagination_post.dto"), exports);
|
|
39
|
+
__exportStar(require("./dto/posts/update_post.dto"), exports);
|
|
40
|
+
__exportStar(require("./dto/posts/post_file.dto"), exports);
|
|
41
|
+
__exportStar(require("./dto/posts/post_fields.dto"), exports);
|
|
35
42
|
//# 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"}
|
|
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"}
|