@hedhog/blog 0.0.13 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. package/dist/author/author.controller.d.ts +13 -5
  2. package/dist/author/author.controller.d.ts.map +1 -1
  3. package/dist/author/author.controller.js +7 -7
  4. package/dist/author/author.controller.js.map +1 -1
  5. package/dist/author/author.service.d.ts +9 -1
  6. package/dist/author/author.service.d.ts.map +1 -1
  7. package/dist/category/category.controller.d.ts +13 -5
  8. package/dist/category/category.controller.d.ts.map +1 -1
  9. package/dist/category/category.controller.js +9 -9
  10. package/dist/category/category.controller.js.map +1 -1
  11. package/dist/category/category.service.d.ts +9 -1
  12. package/dist/category/category.service.d.ts.map +1 -1
  13. package/dist/category/dto/create.dto.d.ts +1 -1
  14. package/dist/category/dto/create.dto.d.ts.map +1 -1
  15. package/dist/category/dto/create.dto.js +2 -2
  16. package/dist/category/dto/create.dto.js.map +1 -1
  17. package/dist/post/post.controller.d.ts +13 -5
  18. package/dist/post/post.controller.d.ts.map +1 -1
  19. package/dist/post/post.controller.js +7 -7
  20. package/dist/post/post.controller.js.map +1 -1
  21. package/dist/post/post.service.d.ts +9 -1
  22. package/dist/post/post.service.d.ts.map +1 -1
  23. package/hedhog.yaml +133 -133
  24. package/package.json +9 -5
  25. package/frontend/author/components/author.screen.ts +0 -105
  26. package/frontend/author/components/author.screen.tsx +0 -105
  27. package/frontend/author/components/create-panel.tsx +0 -64
  28. package/frontend/author/components/update-panel.tsx +0 -75
  29. package/frontend/author/locales/en/blog.author.json +0 -11
  30. package/frontend/author/locales/pt/blog.author.json +0 -11
  31. package/frontend/author/react-query/handlers.ts +0 -28
  32. package/frontend/author/react-query/requests.ts +0 -54
  33. package/frontend/category/components/category.screen.ts +0 -105
  34. package/frontend/category/components/category.screen.tsx +0 -105
  35. package/frontend/category/components/create-panel.tsx +0 -53
  36. package/frontend/category/components/update-panel.tsx +0 -64
  37. package/frontend/category/locales/en/blog.category.json +0 -11
  38. package/frontend/category/locales/pt/blog.category.json +0 -11
  39. package/frontend/category/react-query/handlers.ts +0 -28
  40. package/frontend/category/react-query/requests.ts +0 -55
  41. package/frontend/post/components/create-panel.tsx +0 -78
  42. package/frontend/post/components/post.screen.ts +0 -105
  43. package/frontend/post/components/post.screen.tsx +0 -105
  44. package/frontend/post/components/update-panel.tsx +0 -89
  45. package/frontend/post/locales/en/blog.post.json +0 -11
  46. package/frontend/post/locales/pt/blog.post.json +0 -11
  47. package/frontend/post/react-query/handlers.ts +0 -28
  48. package/frontend/post/react-query/requests.ts +0 -54
@@ -1,11 +1,19 @@
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";
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
5
  export declare class AuthorController {
6
6
  private readonly authorService;
7
7
  constructor(authorService: AuthorService);
8
- list(paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
8
+ list(paginationParams: any): Promise<{
9
+ total: any;
10
+ lastPage: number;
11
+ page: number;
12
+ pageSize: number;
13
+ prev: number;
14
+ next: number;
15
+ data: any;
16
+ }>;
9
17
  get(id: number): Promise<any>;
10
18
  create(data: CreateDTO): Promise<any>;
11
19
  update(id: number, data: UpdateDTO): Promise<any>;
@@ -1 +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"}
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"}
@@ -19,7 +19,7 @@ const create_dto_1 = require("./dto/create.dto");
19
19
  const delete_dto_1 = require("./dto/delete.dto");
20
20
  const update_dto_1 = require("./dto/update.dto");
21
21
  const author_service_1 = require("./author.service");
22
- const admin_1 = require("@hedhog/admin");
22
+ const core_1 = require("@hedhog/core");
23
23
  let AuthorController = class AuthorController {
24
24
  constructor(authorService) {
25
25
  this.authorService = authorService;
@@ -52,8 +52,8 @@ __decorate([
52
52
  __metadata("design:returntype", Promise)
53
53
  ], AuthorController.prototype, "list", null);
54
54
  __decorate([
55
- (0, common_1.Get)(":id"),
56
- __param(0, (0, common_1.Param)("id", common_1.ParseIntPipe)),
55
+ (0, common_1.Get)(':id'),
56
+ __param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
57
57
  __metadata("design:type", Function),
58
58
  __metadata("design:paramtypes", [Number]),
59
59
  __metadata("design:returntype", Promise)
@@ -66,8 +66,8 @@ __decorate([
66
66
  __metadata("design:returntype", Promise)
67
67
  ], AuthorController.prototype, "create", null);
68
68
  __decorate([
69
- (0, common_1.Patch)(":id"),
70
- __param(0, (0, common_1.Param)("id", common_1.ParseIntPipe)),
69
+ (0, common_1.Patch)(':id'),
70
+ __param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
71
71
  __param(1, (0, common_1.Body)()),
72
72
  __metadata("design:type", Function),
73
73
  __metadata("design:paramtypes", [Number, update_dto_1.UpdateDTO]),
@@ -81,8 +81,8 @@ __decorate([
81
81
  __metadata("design:returntype", Promise)
82
82
  ], AuthorController.prototype, "delete", null);
83
83
  exports.AuthorController = AuthorController = __decorate([
84
- (0, admin_1.Role)(),
85
- (0, common_1.Controller)("author"),
84
+ (0, core_1.Role)(),
85
+ (0, common_1.Controller)('author'),
86
86
  __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => author_service_1.AuthorService))),
87
87
  __metadata("design:paramtypes", [author_service_1.AuthorService])
88
88
  ], AuthorController);
@@ -1 +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,gBAAg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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,WAAI,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"}
@@ -7,7 +7,15 @@ export declare class AuthorService {
7
7
  private readonly prismaService;
8
8
  private readonly paginationService;
9
9
  constructor(prismaService: PrismaService, paginationService: PaginationService);
10
- list(paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
10
+ list(paginationParams: PaginationDTO): Promise<{
11
+ total: any;
12
+ lastPage: number;
13
+ page: number;
14
+ pageSize: number;
15
+ prev: number;
16
+ next: number;
17
+ data: any;
18
+ }>;
11
19
  get(authorId: number): Promise<any>;
12
20
  create(data: CreateDTO): Promise<any>;
13
21
  update({ id, data }: {
@@ -1 +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,kBAA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AI,EAAE,SAAS,CAAA;KAAE;IAOpD,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS;CAehC"}
@@ -1,11 +1,19 @@
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";
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
5
  export declare class CategoryController {
6
6
  private readonly categoryService;
7
7
  constructor(categoryService: CategoryService);
8
- list(paginationParams: any, locale: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
8
+ list(paginationParams: any, locale: any): Promise<{
9
+ total: any;
10
+ lastPage: number;
11
+ page: number;
12
+ pageSize: number;
13
+ prev: number;
14
+ next: number;
15
+ data: any;
16
+ }>;
9
17
  get(id: number): Promise<any>;
10
18
  create(data: CreateDTO): Promise<any>;
11
19
  update(id: number, data: UpdateDTO): Promise<any>;
@@ -1 +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"}
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"}
@@ -13,14 +13,14 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.CategoryController = void 0;
16
- const admin_1 = require("@hedhog/admin");
16
+ const locale_1 = require("@hedhog/locale");
17
17
  const pagination_1 = require("@hedhog/pagination");
18
18
  const common_1 = require("@nestjs/common");
19
19
  const create_dto_1 = require("./dto/create.dto");
20
20
  const delete_dto_1 = require("./dto/delete.dto");
21
21
  const update_dto_1 = require("./dto/update.dto");
22
22
  const category_service_1 = require("./category.service");
23
- const admin_2 = require("@hedhog/admin");
23
+ const core_1 = require("@hedhog/core");
24
24
  let CategoryController = class CategoryController {
25
25
  constructor(categoryService) {
26
26
  this.categoryService = categoryService;
@@ -48,14 +48,14 @@ exports.CategoryController = CategoryController;
48
48
  __decorate([
49
49
  (0, common_1.Get)(),
50
50
  __param(0, (0, pagination_1.Pagination)()),
51
- __param(1, (0, admin_1.Locale)()),
51
+ __param(1, (0, locale_1.Locale)()),
52
52
  __metadata("design:type", Function),
53
53
  __metadata("design:paramtypes", [Object, Object]),
54
54
  __metadata("design:returntype", Promise)
55
55
  ], CategoryController.prototype, "list", null);
56
56
  __decorate([
57
- (0, common_1.Get)(":id"),
58
- __param(0, (0, common_1.Param)("id", common_1.ParseIntPipe)),
57
+ (0, common_1.Get)(':id'),
58
+ __param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
59
59
  __metadata("design:type", Function),
60
60
  __metadata("design:paramtypes", [Number]),
61
61
  __metadata("design:returntype", Promise)
@@ -68,8 +68,8 @@ __decorate([
68
68
  __metadata("design:returntype", Promise)
69
69
  ], CategoryController.prototype, "create", null);
70
70
  __decorate([
71
- (0, common_1.Patch)(":id"),
72
- __param(0, (0, common_1.Param)("id", common_1.ParseIntPipe)),
71
+ (0, common_1.Patch)(':id'),
72
+ __param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
73
73
  __param(1, (0, common_1.Body)()),
74
74
  __metadata("design:type", Function),
75
75
  __metadata("design:paramtypes", [Number, update_dto_1.UpdateDTO]),
@@ -83,8 +83,8 @@ __decorate([
83
83
  __metadata("design:returntype", Promise)
84
84
  ], CategoryController.prototype, "delete", null);
85
85
  exports.CategoryController = CategoryController = __decorate([
86
- (0, admin_2.Role)(),
87
- (0, common_1.Controller)("category"),
86
+ (0, core_1.Role)(),
87
+ (0, common_1.Controller)('category'),
88
88
  __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => category_service_1.CategoryService))),
89
89
  __metadata("design:paramtypes", [category_service_1.CategoryService])
90
90
  ], CategoryController);
@@ -1 +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;AAC7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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,eAAM,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,WAAI,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"}
@@ -7,7 +7,15 @@ export declare class CategoryService {
7
7
  private readonly prismaService;
8
8
  private readonly paginationService;
9
9
  constructor(prismaService: PrismaService, paginationService: PaginationService);
10
- list(locale: string, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
10
+ list(locale: string, paginationParams: PaginationDTO): Promise<{
11
+ total: any;
12
+ lastPage: number;
13
+ page: number;
14
+ pageSize: number;
15
+ prev: number;
16
+ next: number;
17
+ data: any;
18
+ }>;
11
19
  get(categoryId: number): Promise<any>;
12
20
  create(data: CreateDTO): Promise<any>;
13
21
  update({ id, data }: {
@@ -1 +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;IAsCpD,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"}
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;;;;;;;;;IAsCpD,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"}
@@ -1,4 +1,4 @@
1
- import { WithLocaleDTO } from '@hedhog/admin';
1
+ import { WithLocaleDTO } from '@hedhog/locale';
2
2
  export declare class CreateDTO extends WithLocaleDTO {
3
3
  slug: string;
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/category/dto/create.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,qBAAa,SAAU,SAAQ,aAAa;IAG1C,IAAI,EAAE,MAAM,CAAC;CACd"}
1
+ {"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/category/dto/create.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,qBAAa,SAAU,SAAQ,aAAa;IAG1C,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -11,8 +11,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CreateDTO = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
- const admin_1 = require("@hedhog/admin");
15
- class CreateDTO extends admin_1.WithLocaleDTO {
14
+ const locale_1 = require("@hedhog/locale");
15
+ class CreateDTO extends locale_1.WithLocaleDTO {
16
16
  }
17
17
  exports.CreateDTO = CreateDTO;
18
18
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/category/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmD;AACnD,yCAA8C;AAE9C,MAAa,SAAU,SAAQ,qBAAa;CAI3C;AAJD,8BAIC;AADC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,CAAC,EAAE,GAAG,CAAC;;uCACF"}
1
+ {"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/category/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmD;AACnD,2CAA+C;AAE/C,MAAa,SAAU,SAAQ,sBAAa;CAI3C;AAJD,8BAIC;AADC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,CAAC,EAAE,GAAG,CAAC;;uCACF"}
@@ -1,11 +1,19 @@
1
- import { CreateDTO } from "./dto/create.dto";
2
- import { DeleteDTO } from "./dto/delete.dto";
3
- import { UpdateDTO } from "./dto/update.dto";
4
- import { PostService } from "./post.service";
1
+ import { CreateDTO } from './dto/create.dto';
2
+ import { DeleteDTO } from './dto/delete.dto';
3
+ import { UpdateDTO } from './dto/update.dto';
4
+ import { PostService } from './post.service';
5
5
  export declare class PostController {
6
6
  private readonly postService;
7
7
  constructor(postService: PostService);
8
- list(paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
8
+ list(paginationParams: any): Promise<{
9
+ total: any;
10
+ lastPage: number;
11
+ page: number;
12
+ pageSize: number;
13
+ prev: number;
14
+ next: number;
15
+ data: any;
16
+ }>;
9
17
  get(id: number): Promise<any>;
10
18
  create(data: CreateDTO): Promise<any>;
11
19
  update(id: number, data: UpdateDTO): Promise<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"post.controller.d.ts","sourceRoot":"","sources":["../../src/post/post.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,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,qBAEa,cAAc;IAGvB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAIrC,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"}
1
+ {"version":3,"file":"post.controller.d.ts","sourceRoot":"","sources":["../../src/post/post.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,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,qBAEa,cAAc;IAGvB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAIrC,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"}
@@ -19,7 +19,7 @@ const create_dto_1 = require("./dto/create.dto");
19
19
  const delete_dto_1 = require("./dto/delete.dto");
20
20
  const update_dto_1 = require("./dto/update.dto");
21
21
  const post_service_1 = require("./post.service");
22
- const admin_1 = require("@hedhog/admin");
22
+ const core_1 = require("@hedhog/core");
23
23
  let PostController = class PostController {
24
24
  constructor(postService) {
25
25
  this.postService = postService;
@@ -52,8 +52,8 @@ __decorate([
52
52
  __metadata("design:returntype", Promise)
53
53
  ], PostController.prototype, "list", null);
54
54
  __decorate([
55
- (0, common_1.Get)(":id"),
56
- __param(0, (0, common_1.Param)("id", common_1.ParseIntPipe)),
55
+ (0, common_1.Get)(':id'),
56
+ __param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
57
57
  __metadata("design:type", Function),
58
58
  __metadata("design:paramtypes", [Number]),
59
59
  __metadata("design:returntype", Promise)
@@ -66,8 +66,8 @@ __decorate([
66
66
  __metadata("design:returntype", Promise)
67
67
  ], PostController.prototype, "create", null);
68
68
  __decorate([
69
- (0, common_1.Patch)(":id"),
70
- __param(0, (0, common_1.Param)("id", common_1.ParseIntPipe)),
69
+ (0, common_1.Patch)(':id'),
70
+ __param(0, (0, common_1.Param)('id', common_1.ParseIntPipe)),
71
71
  __param(1, (0, common_1.Body)()),
72
72
  __metadata("design:type", Function),
73
73
  __metadata("design:paramtypes", [Number, update_dto_1.UpdateDTO]),
@@ -81,8 +81,8 @@ __decorate([
81
81
  __metadata("design:returntype", Promise)
82
82
  ], PostController.prototype, "delete", null);
83
83
  exports.PostController = PostController = __decorate([
84
- (0, admin_1.Role)(),
85
- (0, common_1.Controller)("post"),
84
+ (0, core_1.Role)(),
85
+ (0, common_1.Controller)('post'),
86
86
  __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => post_service_1.PostService))),
87
87
  __metadata("design:paramtypes", [post_service_1.PostService])
88
88
  ], PostController);
@@ -1 +1 @@
1
- {"version":3,"file":"post.controller.js","sourceRoot":"","sources":["../../src/post/post.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;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AM,CAAS,IAAe;QAClC,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;CACF,CAAA;AAjCY,wCAAc;AAOnB;IADL,IAAA,YAAG,GAAE;IACM,WAAA,IAAA,uBAAU,GAAE,CAAA;;;;0CAEvB;AAGK;IADL,IAAA,YAAG,EAAC,KAAK,CAAC;IACA,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;yCAEnC;AAGK;IADL,IAAA,aAAI,GAAE;IACO,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;4CAEnC;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;;4CAK1E;AAGK;IADL,IAAA,eAAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;4CAEnC;yBAhCU,cAAc;IAF1B,IAAA,WAAI,GAAE;IACN,IAAA,mBAAU,EAAC,MAAM,CAAC;IAGd,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC,CAAC,CAAA;qCACR,0BAAW;GAHhC,cAAc,CAiC1B"}
@@ -7,7 +7,15 @@ export declare class PostService {
7
7
  private readonly prismaService;
8
8
  private readonly paginationService;
9
9
  constructor(prismaService: PrismaService, paginationService: PaginationService);
10
- list(paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
10
+ list(paginationParams: PaginationDTO): Promise<{
11
+ total: any;
12
+ lastPage: number;
13
+ page: number;
14
+ pageSize: number;
15
+ prev: number;
16
+ next: number;
17
+ data: any;
18
+ }>;
11
19
  get(postId: number): Promise<any>;
12
20
  create(data: CreateDTO): Promise<any>;
13
21
  update({ id, data }: {
@@ -1 +1 @@
1
- {"version":3,"file":"post.service.d.ts","sourceRoot":"","sources":["../../src/post/post.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,WAAW;IAGpB,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;IAsBpC,GAAG,CAAC,MAAM,EAAE,MAAM;IAMlB,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"}
1
+ {"version":3,"file":"post.service.d.ts","sourceRoot":"","sources":["../../src/post/post.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,WAAW;IAGpB,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;;;;;;;;;IAsBpC,GAAG,CAAC,MAAM,EAAE,MAAM;IAMlB,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"}
package/hedhog.yaml CHANGED
@@ -1,133 +1,133 @@
1
- data:
2
- route:
3
- - url: /auth/login
4
- method: POST
5
- - url: /post
6
- method: GET
7
- - url: /post/:id
8
- method: GET
9
- - url: /author
10
- method: GET
11
- relations: &a1
12
- role:
13
- - where:
14
- slug: admin
15
- - url: /author/:id
16
- method: GET
17
- relations: *a1
18
- - url: /category
19
- method: GET
20
- relations: &a2
21
- role:
22
- - where:
23
- slug: admin
24
- - url: /category/:id
25
- method: GET
26
- relations: *a2
27
- menu:
28
- - name:
29
- en: Author
30
- pt: Author
31
- icon: file
32
- url: /author
33
- slug: author
34
- relations: *a1
35
- - name:
36
- en: Category
37
- pt: Category
38
- icon: file
39
- url: /category
40
- slug: category
41
- relations: *a2
42
- - name:
43
- en: Post
44
- pt: Post
45
- icon: file
46
- url: /post
47
- slug: post
48
- relations:
49
- role:
50
- - where:
51
- slug: admin
52
- screen:
53
- - name:
54
- en: Author
55
- pt: Author
56
- slug: author
57
- description:
58
- en: Screen to manage author
59
- pt: Tela para gerenciar author
60
- icon: file
61
- - name:
62
- en: Category
63
- pt: Category
64
- slug: category
65
- description:
66
- en: Screen to manage category
67
- pt: Tela para gerenciar category
68
- icon: file
69
- - name:
70
- en: Post
71
- pt: Post
72
- slug: post
73
- description:
74
- en: Screen to manage post
75
- pt: Tela para gerenciar post
76
- icon: file
77
- tables:
78
- author:
79
- columns:
80
- - type: pk
81
- - name: name
82
- - name: email
83
- ifNotExists: true
84
- category:
85
- columns:
86
- - type: pk
87
- - type: slug
88
- - type: created_at
89
- - type: updated_at
90
- ifNotExists: true
91
- category_locale:
92
- columns:
93
- - name: category_id
94
- type: fk
95
- isPrimary: true
96
- references:
97
- table: category
98
- column: id
99
- onDelete: RESTRICT
100
- - name: locale_id
101
- type: fk
102
- isPrimary: true
103
- references:
104
- table: locale
105
- column: id
106
- onDelete: RESTRICT
107
- - name: name
108
- length: 100
109
- - name: description
110
- length: 512
111
- - type: created_at
112
- - type: updated_at
113
- post:
114
- columns:
115
- - type: pk
116
- - name: title
117
- - name: content
118
- type: text
119
- - name: author_id
120
- type: fk
121
- references:
122
- table: author
123
- column: id
124
- onDelete: CASCADE
125
- - name: category_id
126
- type: fk
127
- references:
128
- table: category
129
- column: id
130
- onDelete: RESTRICT
131
- - type: created_at
132
- - type: updated_at
133
- ifNotExists: true
1
+ data:
2
+ route:
3
+ - url: /auth/login
4
+ method: POST
5
+ - url: /post
6
+ method: GET
7
+ - url: /post/:id
8
+ method: GET
9
+ - url: /author
10
+ method: GET
11
+ relations: &a1
12
+ role:
13
+ - where:
14
+ slug: admin
15
+ - url: /author/:id
16
+ method: GET
17
+ relations: *a1
18
+ - url: /category
19
+ method: GET
20
+ relations: &a2
21
+ role:
22
+ - where:
23
+ slug: admin
24
+ - url: /category/:id
25
+ method: GET
26
+ relations: *a2
27
+ menu:
28
+ - name:
29
+ en: Author
30
+ pt: Author
31
+ icon: file
32
+ url: /author
33
+ slug: author
34
+ relations: *a1
35
+ - name:
36
+ en: Category
37
+ pt: Category
38
+ icon: file
39
+ url: /category
40
+ slug: category
41
+ relations: *a2
42
+ - name:
43
+ en: Post
44
+ pt: Post
45
+ icon: file
46
+ url: /post
47
+ slug: post
48
+ relations:
49
+ role:
50
+ - where:
51
+ slug: admin
52
+ screen:
53
+ - name:
54
+ en: Author
55
+ pt: Author
56
+ slug: author
57
+ description:
58
+ en: Screen to manage author
59
+ pt: Tela para gerenciar author
60
+ icon: file
61
+ - name:
62
+ en: Category
63
+ pt: Category
64
+ slug: category
65
+ description:
66
+ en: Screen to manage category
67
+ pt: Tela para gerenciar category
68
+ icon: file
69
+ - name:
70
+ en: Post
71
+ pt: Post
72
+ slug: post
73
+ description:
74
+ en: Screen to manage post
75
+ pt: Tela para gerenciar post
76
+ icon: file
77
+ tables:
78
+ author:
79
+ columns:
80
+ - type: pk
81
+ - name: name
82
+ - name: email
83
+ ifNotExists: true
84
+ category:
85
+ columns:
86
+ - type: pk
87
+ - type: slug
88
+ - type: created_at
89
+ - type: updated_at
90
+ ifNotExists: true
91
+ category_locale:
92
+ columns:
93
+ - name: category_id
94
+ type: fk
95
+ isPrimary: true
96
+ references:
97
+ table: category
98
+ column: id
99
+ onDelete: RESTRICT
100
+ - name: locale_id
101
+ type: fk
102
+ isPrimary: true
103
+ references:
104
+ table: locale
105
+ column: id
106
+ onDelete: RESTRICT
107
+ - name: name
108
+ length: 100
109
+ - name: description
110
+ length: 512
111
+ - type: created_at
112
+ - type: updated_at
113
+ post:
114
+ columns:
115
+ - type: pk
116
+ - name: title
117
+ - name: content
118
+ type: text
119
+ - name: author_id
120
+ type: fk
121
+ references:
122
+ table: author
123
+ column: id
124
+ onDelete: CASCADE
125
+ - name: category_id
126
+ type: fk
127
+ references:
128
+ table: category
129
+ column: id
130
+ onDelete: RESTRICT
131
+ - type: created_at
132
+ - type: updated_at
133
+ ifNotExists: true