@hedhog/blog 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. package/dist/author/author.controller.d.ts +14 -0
  2. package/dist/author/author.controller.d.ts.map +1 -0
  3. package/dist/author/author.controller.js +89 -0
  4. package/dist/author/author.controller.js.map +1 -0
  5. package/dist/author/author.module.d.ts +3 -0
  6. package/dist/author/author.module.d.ts.map +1 -0
  7. package/dist/author/author.module.js +31 -0
  8. package/dist/author/author.module.js.map +1 -0
  9. package/dist/author/author.service.d.ts +19 -0
  10. package/dist/author/author.service.d.ts.map +1 -0
  11. package/dist/author/author.service.js +72 -0
  12. package/dist/author/author.service.js.map +1 -0
  13. package/dist/author/dto/create.dto.d.ts +5 -0
  14. package/dist/author/dto/create.dto.d.ts.map +1 -0
  15. package/dist/author/dto/create.dto.js +27 -0
  16. package/dist/author/dto/create.dto.js.map +1 -0
  17. package/dist/author/dto/delete.dto.d.ts +4 -0
  18. package/dist/author/dto/delete.dto.d.ts.map +1 -0
  19. package/dist/author/dto/delete.dto.js +23 -0
  20. package/dist/author/dto/delete.dto.js.map +1 -0
  21. package/dist/author/dto/update.dto.d.ts +6 -0
  22. package/dist/author/dto/update.dto.d.ts.map +1 -0
  23. package/dist/author/dto/update.dto.js +9 -0
  24. package/dist/author/dto/update.dto.js.map +1 -0
  25. package/dist/blog.module.d.ts +3 -0
  26. package/dist/blog.module.d.ts.map +1 -0
  27. package/dist/blog.module.js +35 -0
  28. package/dist/blog.module.js.map +1 -0
  29. package/dist/category/category.controller.d.ts +14 -0
  30. package/dist/category/category.controller.d.ts.map +1 -0
  31. package/dist/category/category.controller.js +91 -0
  32. package/dist/category/category.controller.js.map +1 -0
  33. package/dist/category/category.module.d.ts +3 -0
  34. package/dist/category/category.module.d.ts.map +1 -0
  35. package/dist/category/category.module.js +31 -0
  36. package/dist/category/category.module.js.map +1 -0
  37. package/dist/category/category.service.d.ts +19 -0
  38. package/dist/category/category.service.d.ts.map +1 -0
  39. package/dist/category/category.service.js +87 -0
  40. package/dist/category/category.service.js.map +1 -0
  41. package/dist/category/dto/create.dto.d.ts +5 -0
  42. package/dist/category/dto/create.dto.d.ts.map +1 -0
  43. package/dist/category/dto/create.dto.js +23 -0
  44. package/dist/category/dto/create.dto.js.map +1 -0
  45. package/dist/category/dto/delete.dto.d.ts +4 -0
  46. package/dist/category/dto/delete.dto.d.ts.map +1 -0
  47. package/dist/category/dto/delete.dto.js +23 -0
  48. package/dist/category/dto/delete.dto.js.map +1 -0
  49. package/dist/category/dto/update.dto.d.ts +6 -0
  50. package/dist/category/dto/update.dto.d.ts.map +1 -0
  51. package/dist/category/dto/update.dto.js +9 -0
  52. package/dist/category/dto/update.dto.js.map +1 -0
  53. package/dist/index.d.ts +2 -0
  54. package/dist/index.d.ts.map +1 -0
  55. package/dist/index.js +18 -0
  56. package/dist/index.js.map +1 -0
  57. package/dist/post/dto/create.dto.d.ts +5 -0
  58. package/dist/post/dto/create.dto.d.ts.map +1 -0
  59. package/dist/post/dto/create.dto.js +26 -0
  60. package/dist/post/dto/create.dto.js.map +1 -0
  61. package/dist/post/dto/delete.dto.d.ts +4 -0
  62. package/dist/post/dto/delete.dto.d.ts.map +1 -0
  63. package/dist/post/dto/delete.dto.js +23 -0
  64. package/dist/post/dto/delete.dto.js.map +1 -0
  65. package/dist/post/dto/update.dto.d.ts +6 -0
  66. package/dist/post/dto/update.dto.d.ts.map +1 -0
  67. package/dist/post/dto/update.dto.js +9 -0
  68. package/dist/post/dto/update.dto.js.map +1 -0
  69. package/dist/post/post.controller.d.ts +14 -0
  70. package/dist/post/post.controller.d.ts.map +1 -0
  71. package/dist/post/post.controller.js +89 -0
  72. package/dist/post/post.controller.js.map +1 -0
  73. package/dist/post/post.module.d.ts +3 -0
  74. package/dist/post/post.module.d.ts.map +1 -0
  75. package/dist/post/post.module.js +31 -0
  76. package/dist/post/post.module.js.map +1 -0
  77. package/dist/post/post.service.d.ts +19 -0
  78. package/dist/post/post.service.d.ts.map +1 -0
  79. package/dist/post/post.service.js +72 -0
  80. package/dist/post/post.service.js.map +1 -0
  81. package/frontend/author/components/create-panel.d.ts +9 -0
  82. package/frontend/author/components/create-panel.d.ts.map +1 -0
  83. package/frontend/author/components/create-panel.js +42 -0
  84. package/frontend/author/components/create-panel.js.map +1 -0
  85. package/frontend/author/components/create-panel.tsx +60 -0
  86. package/frontend/author/components/update-panel.d.ts +7 -0
  87. package/frontend/author/components/update-panel.d.ts.map +1 -0
  88. package/frontend/author/components/update-panel.js +52 -0
  89. package/frontend/author/components/update-panel.js.map +1 -0
  90. package/frontend/author/components/update-panel.tsx +70 -0
  91. package/frontend/author/react-query/handlers.d.ts +5 -0
  92. package/frontend/author/react-query/handlers.d.ts.map +1 -0
  93. package/frontend/author/react-query/handlers.js +30 -0
  94. package/frontend/author/react-query/handlers.js.map +1 -0
  95. package/frontend/author/react-query/handlers.ts +28 -0
  96. package/frontend/author/react-query/requests.d.ts +10 -0
  97. package/frontend/author/react-query/requests.d.ts.map +1 -0
  98. package/frontend/author/react-query/requests.js +48 -0
  99. package/frontend/author/react-query/requests.js.map +1 -0
  100. package/frontend/author/react-query/requests.ts +53 -0
  101. package/frontend/category/components/create-panel.d.ts +9 -0
  102. package/frontend/category/components/create-panel.d.ts.map +1 -0
  103. package/frontend/category/components/create-panel.js +48 -0
  104. package/frontend/category/components/create-panel.js.map +1 -0
  105. package/frontend/category/components/create-panel.tsx +49 -0
  106. package/frontend/category/components/update-panel.d.ts +7 -0
  107. package/frontend/category/components/update-panel.d.ts.map +1 -0
  108. package/frontend/category/components/update-panel.js +61 -0
  109. package/frontend/category/components/update-panel.js.map +1 -0
  110. package/frontend/category/components/update-panel.tsx +59 -0
  111. package/frontend/category/react-query/handlers.d.ts +5 -0
  112. package/frontend/category/react-query/handlers.d.ts.map +1 -0
  113. package/frontend/category/react-query/handlers.js +30 -0
  114. package/frontend/category/react-query/handlers.js.map +1 -0
  115. package/frontend/category/react-query/handlers.ts +28 -0
  116. package/frontend/category/react-query/requests.d.ts +10 -0
  117. package/frontend/category/react-query/requests.d.ts.map +1 -0
  118. package/frontend/category/react-query/requests.js +49 -0
  119. package/frontend/category/react-query/requests.js.map +1 -0
  120. package/frontend/category/react-query/requests.ts +54 -0
  121. package/frontend/post/components/create-panel.d.ts +9 -0
  122. package/frontend/post/components/create-panel.d.ts.map +1 -0
  123. package/frontend/post/components/create-panel.js +54 -0
  124. package/frontend/post/components/create-panel.js.map +1 -0
  125. package/frontend/post/components/create-panel.tsx +74 -0
  126. package/frontend/post/components/update-panel.d.ts +7 -0
  127. package/frontend/post/components/update-panel.d.ts.map +1 -0
  128. package/frontend/post/components/update-panel.js +64 -0
  129. package/frontend/post/components/update-panel.js.map +1 -0
  130. package/frontend/post/components/update-panel.tsx +84 -0
  131. package/frontend/post/react-query/handlers.d.ts +5 -0
  132. package/frontend/post/react-query/handlers.d.ts.map +1 -0
  133. package/frontend/post/react-query/handlers.js +30 -0
  134. package/frontend/post/react-query/handlers.js.map +1 -0
  135. package/frontend/post/react-query/handlers.ts +28 -0
  136. package/frontend/post/react-query/requests.d.ts +10 -0
  137. package/frontend/post/react-query/requests.d.ts.map +1 -0
  138. package/frontend/post/react-query/requests.js +48 -0
  139. package/frontend/post/react-query/requests.js.map +1 -0
  140. package/frontend/post/react-query/requests.ts +53 -0
  141. package/hedhog.yaml +133 -0
  142. package/package.json +35 -0
@@ -0,0 +1,14 @@
1
+ import { CreateDTO } from "./dto/create.dto";
2
+ import { DeleteDTO } from "./dto/delete.dto";
3
+ import { UpdateDTO } from "./dto/update.dto";
4
+ import { AuthorService } from "./author.service";
5
+ export declare class AuthorController {
6
+ private readonly authorService;
7
+ constructor(authorService: AuthorService);
8
+ list(paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
9
+ get(id: number): Promise<any>;
10
+ create(data: CreateDTO): Promise<any>;
11
+ update(id: number, data: UpdateDTO): Promise<any>;
12
+ delete(data: DeleteDTO): Promise<any>;
13
+ }
14
+ //# sourceMappingURL=author.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"author.controller.d.ts","sourceRoot":"","sources":["../../src/author/author.controller.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,qBAEa,gBAAgB;IAGzB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAIzC,IAAI,CAAe,gBAAgB,KAAA;IAKnC,GAAG,CAA4B,EAAE,EAAE,MAAM;IAKzC,MAAM,CAAS,IAAI,EAAE,SAAS;IAK9B,MAAM,CAA4B,EAAE,EAAE,MAAM,EAAU,IAAI,EAAE,SAAS;IAQrE,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
@@ -0,0 +1,89 @@
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
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.AuthorController = void 0;
16
+ const pagination_1 = require("@hedhog/pagination");
17
+ const common_1 = require("@nestjs/common");
18
+ const create_dto_1 = require("./dto/create.dto");
19
+ const delete_dto_1 = require("./dto/delete.dto");
20
+ const update_dto_1 = require("./dto/update.dto");
21
+ const author_service_1 = require("./author.service");
22
+ const admin_1 = require("@hedhog/admin");
23
+ let AuthorController = class AuthorController {
24
+ constructor(authorService) {
25
+ this.authorService = authorService;
26
+ }
27
+ async list(paginationParams) {
28
+ return this.authorService.list(paginationParams);
29
+ }
30
+ async get(id) {
31
+ return this.authorService.get(id);
32
+ }
33
+ async create(data) {
34
+ return this.authorService.create(data);
35
+ }
36
+ async update(id, data) {
37
+ return this.authorService.update({
38
+ id,
39
+ data,
40
+ });
41
+ }
42
+ async delete(data) {
43
+ return this.authorService.delete(data);
44
+ }
45
+ };
46
+ exports.AuthorController = AuthorController;
47
+ __decorate([
48
+ (0, common_1.Get)(),
49
+ __param(0, (0, pagination_1.Pagination)()),
50
+ __metadata("design:type", Function),
51
+ __metadata("design:paramtypes", [Object]),
52
+ __metadata("design:returntype", Promise)
53
+ ], AuthorController.prototype, "list", null);
54
+ __decorate([
55
+ (0, common_1.Get)(":id"),
56
+ __param(0, (0, common_1.Param)("id", common_1.ParseIntPipe)),
57
+ __metadata("design:type", Function),
58
+ __metadata("design:paramtypes", [Number]),
59
+ __metadata("design:returntype", Promise)
60
+ ], AuthorController.prototype, "get", null);
61
+ __decorate([
62
+ (0, common_1.Post)(),
63
+ __param(0, (0, common_1.Body)()),
64
+ __metadata("design:type", Function),
65
+ __metadata("design:paramtypes", [create_dto_1.CreateDTO]),
66
+ __metadata("design:returntype", Promise)
67
+ ], AuthorController.prototype, "create", null);
68
+ __decorate([
69
+ (0, common_1.Patch)(":id"),
70
+ __param(0, (0, common_1.Param)("id", common_1.ParseIntPipe)),
71
+ __param(1, (0, common_1.Body)()),
72
+ __metadata("design:type", Function),
73
+ __metadata("design:paramtypes", [Number, update_dto_1.UpdateDTO]),
74
+ __metadata("design:returntype", Promise)
75
+ ], AuthorController.prototype, "update", null);
76
+ __decorate([
77
+ (0, common_1.Delete)(),
78
+ __param(0, (0, common_1.Body)()),
79
+ __metadata("design:type", Function),
80
+ __metadata("design:paramtypes", [delete_dto_1.DeleteDTO]),
81
+ __metadata("design:returntype", Promise)
82
+ ], AuthorController.prototype, "delete", null);
83
+ exports.AuthorController = AuthorController = __decorate([
84
+ (0, admin_1.Role)(),
85
+ (0, common_1.Controller)("author"),
86
+ __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => author_service_1.AuthorService))),
87
+ __metadata("design:paramtypes", [author_service_1.AuthorService])
88
+ ], AuthorController);
89
+ //# sourceMappingURL=author.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"author.controller.js","sourceRoot":"","sources":["../../src/author/author.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAWwB;AACxB,iDAA6C;AAC7C,iDAA6C;AAC7C,iDAA6C;AAC7C,qDAAiD;AACjD,yCAAqC;AAI9B,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,YAEmB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAGE,AAAN,KAAK,CAAC,IAAI,CAAe,gBAAgB;QACvC,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACnD,CAAC;IAGK,AAAN,KAAK,CAAC,GAAG,CAA4B,EAAU;QAC7C,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACpC,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,IAAe;QAClC,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAA4B,EAAU,EAAU,IAAe;QACzE,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;YAC/B,EAAE;YACF,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,IAAe;QAClC,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;CACF,CAAA;AAjCY,4CAAgB;AAOrB;IADL,IAAA,YAAG,GAAE;IACM,WAAA,IAAA,uBAAU,GAAE,CAAA;;;;4CAEvB;AAGK;IADL,IAAA,YAAG,EAAC,KAAK,CAAC;IACA,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;2CAEnC;AAGK;IADL,IAAA,aAAI,GAAE;IACO,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;8CAEnC;AAGK;IADL,IAAA,cAAK,EAAC,KAAK,CAAC;IACC,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,sBAAS;;8CAK1E;AAGK;IADL,IAAA,eAAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;8CAEnC;2BAhCU,gBAAgB;IAF5B,IAAA,YAAI,GAAE;IACN,IAAA,mBAAU,EAAC,QAAQ,CAAC;IAGhB,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,8BAAa,CAAC,CAAC,CAAA;qCACR,8BAAa;GAHpC,gBAAgB,CAiC5B"}
@@ -0,0 +1,3 @@
1
+ export declare class AuthorModule {
2
+ }
3
+ //# sourceMappingURL=author.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"author.module.d.ts","sourceRoot":"","sources":["../../src/author/author.module.ts"],"names":[],"mappings":"AAMA,qBAUa,YAAY;CAAG"}
@@ -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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.AuthorModule = void 0;
10
+ const admin_1 = require("@hedhog/admin");
11
+ const pagination_1 = require("@hedhog/pagination");
12
+ const prisma_1 = require("@hedhog/prisma");
13
+ const common_1 = require("@nestjs/common");
14
+ const author_service_1 = require("./author.service");
15
+ const author_controller_1 = require("./author.controller");
16
+ let AuthorModule = class AuthorModule {
17
+ };
18
+ exports.AuthorModule = AuthorModule;
19
+ exports.AuthorModule = AuthorModule = __decorate([
20
+ (0, common_1.Module)({
21
+ imports: [
22
+ (0, common_1.forwardRef)(() => admin_1.AdminModule),
23
+ (0, common_1.forwardRef)(() => prisma_1.PrismaModule),
24
+ (0, common_1.forwardRef)(() => pagination_1.PaginationModule),
25
+ ],
26
+ controllers: [author_controller_1.AuthorController],
27
+ providers: [author_service_1.AuthorService],
28
+ exports: [author_service_1.AuthorService],
29
+ })
30
+ ], AuthorModule);
31
+ //# sourceMappingURL=author.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"author.module.js","sourceRoot":"","sources":["../../src/author/author.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yCAA4C;AAC5C,mDAAsD;AACtD,2CAA8C;AAC9C,2CAAoD;AACpD,qDAAiD;AACjD,2DAAuD;AAWhD,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IAVxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,mBAAW,CAAC;YAC7B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6BAAgB,CAAC;SACnC;QACD,WAAW,EAAE,CAAC,oCAAgB,CAAC;QAC/B,SAAS,EAAE,CAAC,8BAAa,CAAC;QAC1B,OAAO,EAAE,CAAC,8BAAa,CAAC;KACzB,CAAC;GACW,YAAY,CAAG"}
@@ -0,0 +1,19 @@
1
+ import { PaginationDTO, PaginationService } from "@hedhog/pagination";
2
+ import { PrismaService } from "@hedhog/prisma";
3
+ import { CreateDTO } from "./dto/create.dto";
4
+ import { DeleteDTO } from "./dto/delete.dto";
5
+ import { UpdateDTO } from "./dto/update.dto";
6
+ export declare class AuthorService {
7
+ private readonly prismaService;
8
+ private readonly paginationService;
9
+ constructor(prismaService: PrismaService, paginationService: PaginationService);
10
+ list(paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
11
+ get(authorId: number): Promise<any>;
12
+ create(data: CreateDTO): Promise<any>;
13
+ update({ id, data }: {
14
+ id: number;
15
+ data: UpdateDTO;
16
+ }): Promise<any>;
17
+ delete({ ids }: DeleteDTO): Promise<any>;
18
+ }
19
+ //# sourceMappingURL=author.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"author.service.d.ts","sourceRoot":"","sources":["../../src/author/author.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,aAAa;IAGtB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,IAAI,CAAC,gBAAgB,EAAE,aAAa;IAkBpC,GAAG,CAAC,QAAQ,EAAE,MAAM;IAMpB,MAAM,CAAC,IAAI,EAAE,SAAS;IAMtB,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE;IAOpD,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS;CAehC"}
@@ -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
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.AuthorService = void 0;
16
+ const pagination_1 = require("@hedhog/pagination");
17
+ const prisma_1 = require("@hedhog/prisma");
18
+ const common_1 = require("@nestjs/common");
19
+ let AuthorService = class AuthorService {
20
+ constructor(prismaService, paginationService) {
21
+ this.prismaService = prismaService;
22
+ this.paginationService = paginationService;
23
+ }
24
+ async list(paginationParams) {
25
+ const OR = [];
26
+ if (!isNaN(+paginationParams.search)) {
27
+ OR.push({ id: { equals: +paginationParams.search } });
28
+ }
29
+ return this.paginationService.paginate(this.prismaService.author, paginationParams, {
30
+ where: {
31
+ OR,
32
+ },
33
+ });
34
+ }
35
+ async get(authorId) {
36
+ return this.prismaService.author.findUnique({
37
+ where: { id: authorId },
38
+ });
39
+ }
40
+ async create(data) {
41
+ return this.prismaService.author.create({
42
+ data,
43
+ });
44
+ }
45
+ async update({ id, data }) {
46
+ return this.prismaService.author.update({
47
+ where: { id },
48
+ data,
49
+ });
50
+ }
51
+ async delete({ ids }) {
52
+ if (ids == undefined || ids == null) {
53
+ throw new common_1.BadRequestException("You must select at least one item to delete.");
54
+ }
55
+ return this.prismaService.author.deleteMany({
56
+ where: {
57
+ id: {
58
+ in: ids,
59
+ },
60
+ },
61
+ });
62
+ }
63
+ };
64
+ exports.AuthorService = AuthorService;
65
+ exports.AuthorService = AuthorService = __decorate([
66
+ (0, common_1.Injectable)(),
67
+ __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => prisma_1.PrismaService))),
68
+ __param(1, (0, common_1.Inject)((0, common_1.forwardRef)(() => pagination_1.PaginationService))),
69
+ __metadata("design:paramtypes", [prisma_1.PrismaService,
70
+ pagination_1.PaginationService])
71
+ ], AuthorService);
72
+ //# sourceMappingURL=author.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"author.service.js","sourceRoot":"","sources":["../../src/author/author.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAsE;AACtE,2CAA+C;AAC/C,2CAKwB;AAMjB,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,YAEmB,aAA4B,EAE5B,iBAAoC;QAFpC,kBAAa,GAAb,aAAa,CAAe;QAE5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,IAAI,CAAC,gBAA+B;QACxC,MAAM,EAAE,GAAU,EAAE,CAAC;QAErB,IAAI,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;YACrC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACxD,CAAC;QAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,MAAM,EACzB,gBAAgB,EAChB;YACE,KAAK,EAAE;gBACL,EAAE;aACH;SACF,CACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB;QACxB,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC;YAC1C,KAAK,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE;SACxB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAe;QAC1B,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;YACtC,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAmC;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;YACtC,KAAK,EAAE,EAAE,EAAE,EAAE;YACb,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAa;QAC7B,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,IAAI,4BAAmB,CAC3B,8CAA8C,CAC/C,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC;YAC1C,KAAK,EAAE;gBACL,EAAE,EAAE;oBACF,EAAE,EAAE,GAAG;iBACR;aACF;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA5DY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,sBAAa,CAAC,CAAC,CAAA;IAEvC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,8BAAiB,CAAC,CAAC,CAAA;qCADZ,sBAAa;QAET,8BAAiB;GAL5C,aAAa,CA4DzB"}
@@ -0,0 +1,5 @@
1
+ export declare class CreateDTO {
2
+ name: string;
3
+ email: string;
4
+ }
5
+ //# sourceMappingURL=create.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/author/dto/create.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAGpB,IAAI,EAAE,MAAM,CAAC;IAIb,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,27 @@
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.CreateDTO = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class CreateDTO {
15
+ }
16
+ exports.CreateDTO = CreateDTO;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.Length)(0, 255),
20
+ __metadata("design:type", String)
21
+ ], CreateDTO.prototype, "name", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.Length)(0, 255),
25
+ __metadata("design:type", String)
26
+ ], CreateDTO.prototype, "email", void 0);
27
+ //# sourceMappingURL=create.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/author/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmD;AAEnD,MAAa,SAAS;CAQrB;AARD,8BAQC;AALC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,CAAC,EAAE,GAAG,CAAC;;uCACF;AAIb;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,CAAC,EAAE,GAAG,CAAC;;wCACD"}
@@ -0,0 +1,4 @@
1
+ export declare class DeleteDTO {
2
+ ids: number[];
3
+ }
4
+ //# sourceMappingURL=delete.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.dto.d.ts","sourceRoot":"","sources":["../../../src/author/dto/delete.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAIpB,GAAG,EAAE,MAAM,EAAE,CAAC;CACf"}
@@ -0,0 +1,23 @@
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.DeleteDTO = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class DeleteDTO {
15
+ }
16
+ exports.DeleteDTO = DeleteDTO;
17
+ __decorate([
18
+ (0, class_validator_1.IsArray)(),
19
+ (0, class_validator_1.ArrayMinSize)(1),
20
+ (0, class_validator_1.IsInt)({ each: true }),
21
+ __metadata("design:type", Array)
22
+ ], DeleteDTO.prototype, "ids", void 0);
23
+ //# sourceMappingURL=delete.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.dto.js","sourceRoot":"","sources":["../../../src/author/dto/delete.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAE/D,MAAa,SAAS;CAKrB;AALD,8BAKC;AADC;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,8BAAY,EAAC,CAAC,CAAC;IACf,IAAA,uBAAK,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;sCACR"}
@@ -0,0 +1,6 @@
1
+ import { CreateDTO } from './create.dto';
2
+ declare const UpdateDTO_base: import("@nestjs/mapped-types").MappedType<Partial<CreateDTO>>;
3
+ export declare class UpdateDTO extends UpdateDTO_base {
4
+ }
5
+ export {};
6
+ //# sourceMappingURL=update.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/author/dto/update.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;AAEzC,qBAAa,SAAU,SAAQ,cAAsB;CAAG"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateDTO = void 0;
4
+ const mapped_types_1 = require("@nestjs/mapped-types");
5
+ const create_dto_1 = require("./create.dto");
6
+ class UpdateDTO extends (0, mapped_types_1.PartialType)(create_dto_1.CreateDTO) {
7
+ }
8
+ exports.UpdateDTO = UpdateDTO;
9
+ //# sourceMappingURL=update.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../src/author/dto/update.dto.ts"],"names":[],"mappings":";;;AAAA,uDAAmD;AACnD,6CAAyC;AAEzC,MAAa,SAAU,SAAQ,IAAA,0BAAW,EAAC,sBAAS,CAAC;CAAG;AAAxD,8BAAwD"}
@@ -0,0 +1,3 @@
1
+ export declare class BlogModule {
2
+ }
3
+ //# sourceMappingURL=blog.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blog.module.d.ts","sourceRoot":"","sources":["../src/blog.module.ts"],"names":[],"mappings":"AAOA,qBAaa,UAAU;CAAG"}
@@ -0,0 +1,35 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.BlogModule = void 0;
10
+ const post_module_1 = require("./post/post.module");
11
+ const category_module_1 = require("./category/category.module");
12
+ const author_module_1 = require("./author/author.module");
13
+ const admin_1 = require("@hedhog/admin");
14
+ const pagination_1 = require("@hedhog/pagination");
15
+ const prisma_1 = require("@hedhog/prisma");
16
+ const common_1 = require("@nestjs/common");
17
+ let BlogModule = class BlogModule {
18
+ };
19
+ exports.BlogModule = BlogModule;
20
+ exports.BlogModule = BlogModule = __decorate([
21
+ (0, common_1.Module)({
22
+ imports: [
23
+ (0, common_1.forwardRef)(() => admin_1.AdminModule),
24
+ (0, common_1.forwardRef)(() => prisma_1.PrismaModule),
25
+ (0, common_1.forwardRef)(() => pagination_1.PaginationModule),
26
+ (0, common_1.forwardRef)(() => author_module_1.AuthorModule),
27
+ (0, common_1.forwardRef)(() => category_module_1.CategoryModule),
28
+ (0, common_1.forwardRef)(() => post_module_1.PostModule),
29
+ ],
30
+ controllers: [],
31
+ providers: [],
32
+ exports: [],
33
+ })
34
+ ], BlogModule);
35
+ //# sourceMappingURL=blog.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blog.module.js","sourceRoot":"","sources":["../src/blog.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAgD;AAChD,gEAA4D;AAC5D,0DAAsD;AACtD,yCAA4C;AAC5C,mDAAsD;AACtD,2CAA8C;AAC9C,2CAAoD;AAc7C,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAG,CAAA;AAAb,gCAAU;qBAAV,UAAU;IAbtB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,mBAAW,CAAC;YAC7B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6BAAgB,CAAC;YAClC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,gCAAc,CAAC;YAChC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;SAC7B;QACD,WAAW,EAAE,EAAE;QACf,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,EAAE;KACZ,CAAC;GACW,UAAU,CAAG"}
@@ -0,0 +1,14 @@
1
+ import { CreateDTO } from "./dto/create.dto";
2
+ import { DeleteDTO } from "./dto/delete.dto";
3
+ import { UpdateDTO } from "./dto/update.dto";
4
+ import { CategoryService } from "./category.service";
5
+ export declare class CategoryController {
6
+ private readonly categoryService;
7
+ constructor(categoryService: CategoryService);
8
+ list(paginationParams: any, locale: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
9
+ get(id: number): Promise<any>;
10
+ create(data: CreateDTO): Promise<any>;
11
+ update(id: number, data: UpdateDTO): Promise<any>;
12
+ delete(data: DeleteDTO): Promise<any>;
13
+ }
14
+ //# sourceMappingURL=category.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"category.controller.d.ts","sourceRoot":"","sources":["../../src/category/category.controller.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,qBAEa,kBAAkB;IAG3B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAAf,eAAe,EAAE,eAAe;IAI7C,IAAI,CAAe,gBAAgB,KAAA,EAAY,MAAM,KAAA;IAKrD,GAAG,CAA4B,EAAE,EAAE,MAAM;IAKzC,MAAM,CAAS,IAAI,EAAE,SAAS;IAK9B,MAAM,CAA4B,EAAE,EAAE,MAAM,EAAU,IAAI,EAAE,SAAS;IAQrE,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
@@ -0,0 +1,91 @@
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
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.CategoryController = void 0;
16
+ const admin_1 = require("@hedhog/admin");
17
+ const pagination_1 = require("@hedhog/pagination");
18
+ const common_1 = require("@nestjs/common");
19
+ const create_dto_1 = require("./dto/create.dto");
20
+ const delete_dto_1 = require("./dto/delete.dto");
21
+ const update_dto_1 = require("./dto/update.dto");
22
+ const category_service_1 = require("./category.service");
23
+ const admin_2 = require("@hedhog/admin");
24
+ let CategoryController = class CategoryController {
25
+ constructor(categoryService) {
26
+ this.categoryService = categoryService;
27
+ }
28
+ async list(paginationParams, locale) {
29
+ return this.categoryService.list(locale, paginationParams);
30
+ }
31
+ async get(id) {
32
+ return this.categoryService.get(id);
33
+ }
34
+ async create(data) {
35
+ return this.categoryService.create(data);
36
+ }
37
+ async update(id, data) {
38
+ return this.categoryService.update({
39
+ id,
40
+ data,
41
+ });
42
+ }
43
+ async delete(data) {
44
+ return this.categoryService.delete(data);
45
+ }
46
+ };
47
+ exports.CategoryController = CategoryController;
48
+ __decorate([
49
+ (0, common_1.Get)(),
50
+ __param(0, (0, pagination_1.Pagination)()),
51
+ __param(1, (0, admin_1.Locale)()),
52
+ __metadata("design:type", Function),
53
+ __metadata("design:paramtypes", [Object, Object]),
54
+ __metadata("design:returntype", Promise)
55
+ ], CategoryController.prototype, "list", null);
56
+ __decorate([
57
+ (0, common_1.Get)(":id"),
58
+ __param(0, (0, common_1.Param)("id", common_1.ParseIntPipe)),
59
+ __metadata("design:type", Function),
60
+ __metadata("design:paramtypes", [Number]),
61
+ __metadata("design:returntype", Promise)
62
+ ], CategoryController.prototype, "get", null);
63
+ __decorate([
64
+ (0, common_1.Post)(),
65
+ __param(0, (0, common_1.Body)()),
66
+ __metadata("design:type", Function),
67
+ __metadata("design:paramtypes", [create_dto_1.CreateDTO]),
68
+ __metadata("design:returntype", Promise)
69
+ ], CategoryController.prototype, "create", null);
70
+ __decorate([
71
+ (0, common_1.Patch)(":id"),
72
+ __param(0, (0, common_1.Param)("id", common_1.ParseIntPipe)),
73
+ __param(1, (0, common_1.Body)()),
74
+ __metadata("design:type", Function),
75
+ __metadata("design:paramtypes", [Number, update_dto_1.UpdateDTO]),
76
+ __metadata("design:returntype", Promise)
77
+ ], CategoryController.prototype, "update", null);
78
+ __decorate([
79
+ (0, common_1.Delete)(),
80
+ __param(0, (0, common_1.Body)()),
81
+ __metadata("design:type", Function),
82
+ __metadata("design:paramtypes", [delete_dto_1.DeleteDTO]),
83
+ __metadata("design:returntype", Promise)
84
+ ], CategoryController.prototype, "delete", null);
85
+ exports.CategoryController = CategoryController = __decorate([
86
+ (0, admin_2.Role)(),
87
+ (0, common_1.Controller)("category"),
88
+ __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => category_service_1.CategoryService))),
89
+ __metadata("design:paramtypes", [category_service_1.CategoryService])
90
+ ], CategoryController);
91
+ //# sourceMappingURL=category.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"category.controller.js","sourceRoot":"","sources":["../../src/category/category.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,yCAAuC;AACvC,mDAAgD;AAChD,2CAWwB;AACxB,iDAA6C;AAC7C,iDAA6C;AAC7C,iDAA6C;AAC7C,yDAAqD;AACrD,yCAAqC;AAI9B,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YAEmB,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAChD,CAAC;IAGE,AAAN,KAAK,CAAC,IAAI,CAAe,gBAAgB,EAAY,MAAM;QACzD,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC7D,CAAC;IAGK,AAAN,KAAK,CAAC,GAAG,CAA4B,EAAU;QAC7C,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACtC,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,IAAe;QAClC,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAA4B,EAAU,EAAU,IAAe;QACzE,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;YACjC,EAAE;YACF,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,IAAe;QAClC,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;CACF,CAAA;AAjCY,gDAAkB;AAOvB;IADL,IAAA,YAAG,GAAE;IACM,WAAA,IAAA,uBAAU,GAAE,CAAA;IAAoB,WAAA,IAAA,cAAM,GAAE,CAAA;;;;8CAEnD;AAGK;IADL,IAAA,YAAG,EAAC,KAAK,CAAC;IACA,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;6CAEnC;AAGK;IADL,IAAA,aAAI,GAAE;IACO,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;gDAEnC;AAGK;IADL,IAAA,cAAK,EAAC,KAAK,CAAC;IACC,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,sBAAS;;gDAK1E;AAGK;IADL,IAAA,eAAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;gDAEnC;6BAhCU,kBAAkB;IAF9B,IAAA,YAAI,GAAE;IACN,IAAA,mBAAU,EAAC,UAAU,CAAC;IAGlB,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,kCAAe,CAAC,CAAC,CAAA;qCACR,kCAAe;GAHxC,kBAAkB,CAiC9B"}
@@ -0,0 +1,3 @@
1
+ export declare class CategoryModule {
2
+ }
3
+ //# sourceMappingURL=category.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"category.module.d.ts","sourceRoot":"","sources":["../../src/category/category.module.ts"],"names":[],"mappings":"AAMA,qBAUa,cAAc;CAAG"}
@@ -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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.CategoryModule = void 0;
10
+ const admin_1 = require("@hedhog/admin");
11
+ const pagination_1 = require("@hedhog/pagination");
12
+ const prisma_1 = require("@hedhog/prisma");
13
+ const common_1 = require("@nestjs/common");
14
+ const category_service_1 = require("./category.service");
15
+ const category_controller_1 = require("./category.controller");
16
+ let CategoryModule = class CategoryModule {
17
+ };
18
+ exports.CategoryModule = CategoryModule;
19
+ exports.CategoryModule = CategoryModule = __decorate([
20
+ (0, common_1.Module)({
21
+ imports: [
22
+ (0, common_1.forwardRef)(() => admin_1.AdminModule),
23
+ (0, common_1.forwardRef)(() => prisma_1.PrismaModule),
24
+ (0, common_1.forwardRef)(() => pagination_1.PaginationModule),
25
+ ],
26
+ controllers: [category_controller_1.CategoryController],
27
+ providers: [category_service_1.CategoryService],
28
+ exports: [category_service_1.CategoryService],
29
+ })
30
+ ], CategoryModule);
31
+ //# sourceMappingURL=category.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"category.module.js","sourceRoot":"","sources":["../../src/category/category.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yCAA4C;AAC5C,mDAAsD;AACtD,2CAA8C;AAC9C,2CAAoD;AACpD,yDAAqD;AACrD,+DAA2D;AAWpD,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,wCAAc;yBAAd,cAAc;IAV1B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,mBAAW,CAAC;YAC7B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6BAAgB,CAAC;SACnC;QACD,WAAW,EAAE,CAAC,wCAAkB,CAAC;QACjC,SAAS,EAAE,CAAC,kCAAe,CAAC;QAC5B,OAAO,EAAE,CAAC,kCAAe,CAAC;KAC3B,CAAC;GACW,cAAc,CAAG"}
@@ -0,0 +1,19 @@
1
+ import { PaginationDTO, PaginationService } from "@hedhog/pagination";
2
+ import { PrismaService } from "@hedhog/prisma";
3
+ import { CreateDTO } from "./dto/create.dto";
4
+ import { DeleteDTO } from "./dto/delete.dto";
5
+ import { UpdateDTO } from "./dto/update.dto";
6
+ export declare class CategoryService {
7
+ private readonly prismaService;
8
+ private readonly paginationService;
9
+ constructor(prismaService: PrismaService, paginationService: PaginationService);
10
+ list(locale: string, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
11
+ get(categoryId: number): Promise<any>;
12
+ create(data: CreateDTO): Promise<any>;
13
+ update({ id, data }: {
14
+ id: number;
15
+ data: UpdateDTO;
16
+ }): Promise<any>;
17
+ delete({ ids }: DeleteDTO): Promise<any>;
18
+ }
19
+ //# sourceMappingURL=category.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"category.service.d.ts","sourceRoot":"","sources":["../../src/category/category.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,eAAe;IAGxB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa;IAkCpD,GAAG,CAAC,UAAU,EAAE,MAAM;IAMtB,MAAM,CAAC,IAAI,EAAE,SAAS;IAMtB,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE;IAOpD,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS;CAehC"}