@hedhog/admin 0.0.12 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. package/dist/admin.module.d.ts.map +1 -1
  2. package/dist/admin.module.js +3 -3
  3. package/dist/admin.module.js.map +1 -1
  4. package/dist/index.d.ts +3 -4
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +3 -4
  7. package/dist/index.js.map +1 -1
  8. package/dist/menu/menu.controller.d.ts.map +1 -1
  9. package/dist/menu/menu.controller.js +3 -9
  10. package/dist/menu/menu.controller.js.map +1 -1
  11. package/dist/menu/menu.module.d.ts.map +1 -1
  12. package/dist/menu/menu.module.js +0 -2
  13. package/dist/menu/menu.module.js.map +1 -1
  14. package/dist/role/decorators/role.decorator.d.ts +3 -0
  15. package/dist/role/decorators/role.decorator.d.ts.map +1 -0
  16. package/dist/role/decorators/role.decorator.js +8 -0
  17. package/dist/role/decorators/role.decorator.js.map +1 -0
  18. package/dist/role/dto/create.dto.d.ts.map +1 -0
  19. package/dist/role/dto/create.dto.js.map +1 -0
  20. package/dist/role/dto/delete.dto.d.ts.map +1 -0
  21. package/dist/role/dto/delete.dto.js.map +1 -0
  22. package/dist/role/dto/update.dto.d.ts.map +1 -0
  23. package/dist/role/dto/update.dto.js.map +1 -0
  24. package/dist/{permission/guards/permission.guard.d.ts → role/guards/role.guard.d.ts} +2 -2
  25. package/dist/role/guards/role.guard.d.ts.map +1 -0
  26. package/dist/{permission/guards/permission.guard.js → role/guards/role.guard.js} +12 -9
  27. package/dist/role/guards/role.guard.js.map +1 -0
  28. package/dist/role/role.controller.d.ts +14 -0
  29. package/dist/role/role.controller.d.ts.map +1 -0
  30. package/dist/{permission/permission.controller.js → role/role.controller.js} +33 -37
  31. package/dist/role/role.controller.js.map +1 -0
  32. package/dist/role/role.module.d.ts +3 -0
  33. package/dist/role/role.module.d.ts.map +1 -0
  34. package/dist/{permission/permission.module.js → role/role.module.js} +13 -13
  35. package/dist/role/role.module.js.map +1 -0
  36. package/dist/{permission/permission.service.d.ts → role/role.service.d.ts} +4 -4
  37. package/dist/role/role.service.d.ts.map +1 -0
  38. package/dist/{permission/permission.service.js → role/role.service.js} +9 -9
  39. package/dist/role/role.service.js.map +1 -0
  40. package/dist/screen/screen.controller.d.ts.map +1 -1
  41. package/dist/screen/screen.controller.js +3 -7
  42. package/dist/screen/screen.controller.js.map +1 -1
  43. package/dist/user/dto/update-roles.dto.d.ts +4 -0
  44. package/dist/user/dto/update-roles.dto.d.ts.map +1 -0
  45. package/dist/user/dto/update-roles.dto.js +24 -0
  46. package/dist/user/dto/update-roles.dto.js.map +1 -0
  47. package/dist/user/user.controller.d.ts +3 -0
  48. package/dist/user/user.controller.d.ts.map +1 -1
  49. package/dist/user/user.controller.js +26 -7
  50. package/dist/user/user.controller.js.map +1 -1
  51. package/dist/user/user.service.d.ts +3 -0
  52. package/dist/user/user.service.d.ts.map +1 -1
  53. package/dist/user/user.service.js +31 -0
  54. package/dist/user/user.service.js.map +1 -1
  55. package/package.json +1 -1
  56. package/src/migrations/migrate-04.ts +8 -0
  57. package/dist/permission/decorators/permission.decorator.d.ts +0 -3
  58. package/dist/permission/decorators/permission.decorator.d.ts.map +0 -1
  59. package/dist/permission/decorators/permission.decorator.js +0 -8
  60. package/dist/permission/decorators/permission.decorator.js.map +0 -1
  61. package/dist/permission/dto/create.dto.d.ts.map +0 -1
  62. package/dist/permission/dto/create.dto.js.map +0 -1
  63. package/dist/permission/dto/delete.dto.d.ts.map +0 -1
  64. package/dist/permission/dto/delete.dto.js.map +0 -1
  65. package/dist/permission/dto/update.dto.d.ts.map +0 -1
  66. package/dist/permission/dto/update.dto.js.map +0 -1
  67. package/dist/permission/guards/permission.guard.d.ts.map +0 -1
  68. package/dist/permission/guards/permission.guard.js.map +0 -1
  69. package/dist/permission/permission.controller.d.ts +0 -14
  70. package/dist/permission/permission.controller.d.ts.map +0 -1
  71. package/dist/permission/permission.controller.js.map +0 -1
  72. package/dist/permission/permission.module.d.ts +0 -3
  73. package/dist/permission/permission.module.d.ts.map +0 -1
  74. package/dist/permission/permission.module.js.map +0 -1
  75. package/dist/permission/permission.service.d.ts.map +0 -1
  76. package/dist/permission/permission.service.js.map +0 -1
  77. package/dist/permission/types/permission.types.d.ts +0 -33
  78. package/dist/permission/types/permission.types.d.ts.map +0 -1
  79. package/dist/permission/types/permission.types.js +0 -3
  80. package/dist/permission/types/permission.types.js.map +0 -1
  81. /package/dist/{permission → role}/dto/create.dto.d.ts +0 -0
  82. /package/dist/{permission → role}/dto/create.dto.js +0 -0
  83. /package/dist/{permission → role}/dto/delete.dto.d.ts +0 -0
  84. /package/dist/{permission → role}/dto/delete.dto.js +0 -0
  85. /package/dist/{permission → role}/dto/update.dto.d.ts +0 -0
  86. /package/dist/{permission → role}/dto/update.dto.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"role.service.js","sourceRoot":"","sources":["../../src/role/role.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAsE;AACtE,2CAA+C;AAC/C,2CAKwB;AAMjB,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB,YAEmB,aAA4B,EAE5B,iBAAoC;QAFpC,kBAAa,GAAb,aAAa,CAAe;QAE5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,QAAQ,CAAC,gBAA+B;QAC5C,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QAEvC,MAAM,EAAE,GAAU,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAC1D,MAAM,EACN,gBAAgB,CACjB,CAAC;QAEF,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,KAAK,EACxB,gBAAgB,EAChB;YACE,KAAK,EAAE;gBACL,EAAE;aACH;SACF,CACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,MAAc;QACtB,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAA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AAE,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;AAIjD,qBAEa,gBAAgB;IAGzB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAKzC,UAAU,CAAe,gBAAgB,KAAA;IAMzC,IAAI,CAAkC,QAAQ,EAAE,MAAM;IAM5D,MAAM,CAAS,IAAI,EAAE,SAAS;IAMxB,MAAM,CACuB,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,SAAS;IAUnB,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
1
+ {"version":3,"file":"screen.controller.d.ts","sourceRoot":"","sources":["../../src/screen/screen.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,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,qBAGa,gBAAgB;IAGzB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAIzC,UAAU,CAAe,gBAAgB,KAAA;IAKzC,IAAI,CAAkC,QAAQ,EAAE,MAAM;IAK5D,MAAM,CAAS,IAAI,EAAE,SAAS;IAKxB,MAAM,CACuB,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,SAAS;IASnB,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
@@ -19,8 +19,8 @@ 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 screen_service_1 = require("./screen.service");
22
- const permission_decorator_1 = require("../permission/decorators/permission.decorator");
23
22
  const auth_guard_1 = require("../auth/guards/auth.guard");
23
+ const role_decorator_1 = require("../role/decorators/role.decorator");
24
24
  let ScreenController = class ScreenController {
25
25
  constructor(screenService) {
26
26
  this.screenService = screenService;
@@ -46,7 +46,6 @@ let ScreenController = class ScreenController {
46
46
  };
47
47
  exports.ScreenController = ScreenController;
48
48
  __decorate([
49
- (0, common_1.UseGuards)(auth_guard_1.AuthGuard),
50
49
  (0, common_1.Get)(),
51
50
  __param(0, (0, pagination_1.Pagination)()),
52
51
  __metadata("design:type", Function),
@@ -54,7 +53,6 @@ __decorate([
54
53
  __metadata("design:returntype", Promise)
55
54
  ], ScreenController.prototype, "getScreens", null);
56
55
  __decorate([
57
- (0, common_1.UseGuards)(auth_guard_1.AuthGuard),
58
56
  (0, common_1.Get)(':screenId'),
59
57
  __param(0, (0, common_1.Param)('screenId', common_1.ParseIntPipe)),
60
58
  __metadata("design:type", Function),
@@ -62,7 +60,6 @@ __decorate([
62
60
  __metadata("design:returntype", Promise)
63
61
  ], ScreenController.prototype, "show", null);
64
62
  __decorate([
65
- (0, common_1.UseGuards)(auth_guard_1.AuthGuard),
66
63
  (0, common_1.Post)(),
67
64
  __param(0, (0, common_1.Body)()),
68
65
  __metadata("design:type", Function),
@@ -70,7 +67,6 @@ __decorate([
70
67
  __metadata("design:returntype", void 0)
71
68
  ], ScreenController.prototype, "create", null);
72
69
  __decorate([
73
- (0, common_1.UseGuards)(auth_guard_1.AuthGuard),
74
70
  (0, common_1.Patch)(':screenId'),
75
71
  __param(0, (0, common_1.Param)('screenId', common_1.ParseIntPipe)),
76
72
  __param(1, (0, common_1.Body)()),
@@ -79,7 +75,6 @@ __decorate([
79
75
  __metadata("design:returntype", Promise)
80
76
  ], ScreenController.prototype, "update", null);
81
77
  __decorate([
82
- (0, common_1.UseGuards)(auth_guard_1.AuthGuard),
83
78
  (0, common_1.Delete)(),
84
79
  __param(0, (0, common_1.Body)()),
85
80
  __metadata("design:type", Function),
@@ -87,7 +82,8 @@ __decorate([
87
82
  __metadata("design:returntype", Promise)
88
83
  ], ScreenController.prototype, "delete", null);
89
84
  exports.ScreenController = ScreenController = __decorate([
90
- (0, permission_decorator_1.Permission)(),
85
+ (0, role_decorator_1.Role)(),
86
+ (0, common_1.UseGuards)(auth_guard_1.AuthGuard),
91
87
  (0, common_1.Controller)('screens'),
92
88
  __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => screen_service_1.ScreenService))),
93
89
  __metadata("design:paramtypes", [screen_service_1.ScreenService])
@@ -1 +1 @@
1
- {"version":3,"file":"screen.controller.js","sourceRoot":"","sources":["../../src/screen/screen.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAYwB;AACxB,iDAA6C;AAC7C,iDAA6C;AAC7C,iDAA6C;AAC7C,qDAAiD;AACjD,wFAA2E;AAC3E,0DAAsD;AAI/C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,YAEmB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAIE,AAAN,KAAK,CAAC,UAAU,CAAe,gBAAgB;QAC7C,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;IACzD,CAAC;IAIK,AAAN,KAAK,CAAC,IAAI,CAAkC,QAAgB;QAC1D,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAID,MAAM,CAAS,IAAe;QAC5B,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAIK,AAAN,KAAK,CAAC,MAAM,CACuB,QAAgB,EACzC,IAAe;QAEvB,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;YAC/B,EAAE,EAAE,QAAQ;YACZ,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAIK,AAAN,KAAK,CAA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IAAA,aAAI,GAAE,CAAA;;6CAAO,sBAAS;;8CAMxB;AAGK;IADL,IAAA,eAAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;8CAEnC;2BAnCU,gBAAgB;IAH5B,IAAA,qBAAI,GAAE;IACN,IAAA,kBAAS,EAAC,sBAAS,CAAC;IACpB,IAAA,mBAAU,EAAC,SAAS,CAAC;IAGjB,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,8BAAa,CAAC,CAAC,CAAA;qCACR,8BAAa;GAHpC,gBAAgB,CAoC5B"}
@@ -0,0 +1,4 @@
1
+ export declare class UpdateRolesDTO {
2
+ ids: number[];
3
+ }
4
+ //# sourceMappingURL=update-roles.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-roles.dto.d.ts","sourceRoot":"","sources":["../../../src/user/dto/update-roles.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,cAAc;IAKzB,GAAG,EAAE,MAAM,EAAE,CAAC;CACf"}
@@ -0,0 +1,24 @@
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.UpdateRolesDTO = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class UpdateRolesDTO {
15
+ }
16
+ exports.UpdateRolesDTO = UpdateRolesDTO;
17
+ __decorate([
18
+ (0, class_validator_1.IsInt)({
19
+ each: true,
20
+ }),
21
+ (0, class_validator_1.IsArray)(),
22
+ __metadata("design:type", Array)
23
+ ], UpdateRolesDTO.prototype, "ids", void 0);
24
+ //# sourceMappingURL=update-roles.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-roles.dto.js","sourceRoot":"","sources":["../../../src/user/dto/update-roles.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AAEjD,MAAa,cAAc;CAM1B;AAND,wCAMC;AADC;IAJC,IAAA,uBAAK,EAAC;QACL,IAAI,EAAE,IAAI;KACX,CAAC;IACD,IAAA,yBAAO,GAAE;;2CACI"}
@@ -2,10 +2,13 @@ import { CreateDTO } from './dto/create.dto';
2
2
  import { DeleteDTO } from './dto/delete.dto';
3
3
  import { UpdateDTO } from './dto/update.dto';
4
4
  import { UserService } from './user.service';
5
+ import { UpdateRolesDTO } from './dto/update-roles.dto';
5
6
  export declare class UserController {
6
7
  private readonly userService;
7
8
  constructor(userService: UserService);
8
9
  getUsers(paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
10
+ listRoles(userId: number, paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
11
+ updateRoles(userId: number, data: UpdateRolesDTO): Promise<any>;
9
12
  show(userId: number): Promise<any>;
10
13
  create(data: CreateDTO): Promise<any>;
11
14
  update(userId: number, data: UpdateDTO): Promise<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"user.controller.d.ts","sourceRoot":"","sources":["../../src/user/user.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,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI7C,qBAEa,cAAc;IAGvB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAKrC,QAAQ,CAAe,gBAAgB,KAAA;IAMvC,IAAI,CAAgC,MAAM,EAAE,MAAM;IAMxD,MAAM,CAAS,IAAI,EAAE,SAAS;IAMxB,MAAM,CACqB,MAAM,EAAE,MAAM,EACrC,IAAI,EAAE,SAAS;IAUnB,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
1
+ {"version":3,"file":"user.controller.d.ts","sourceRoot":"","sources":["../../src/user/user.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,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,qBAGa,cAAc;IAGvB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAIrC,QAAQ,CAAe,gBAAgB,KAAA;IAKvC,SAAS,CACkB,MAAM,EAAE,MAAM,EAC/B,gBAAgB,KAAA;IAM1B,WAAW,CACgB,MAAM,EAAE,MAAM,EACrC,IAAI,EAAE,cAAc;IAMxB,IAAI,CAAgC,MAAM,EAAE,MAAM;IAKxD,MAAM,CAAS,IAAI,EAAE,SAAS;IAKxB,MAAM,CACqB,MAAM,EAAE,MAAM,EACrC,IAAI,EAAE,SAAS;IASnB,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
@@ -19,8 +19,9 @@ 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 user_service_1 = require("./user.service");
22
- const permission_decorator_1 = require("../permission/decorators/permission.decorator");
23
22
  const auth_guard_1 = require("../auth/guards/auth.guard");
23
+ const update_roles_dto_1 = require("./dto/update-roles.dto");
24
+ const role_decorator_1 = require("../role/decorators/role.decorator");
24
25
  let UserController = class UserController {
25
26
  constructor(userService) {
26
27
  this.userService = userService;
@@ -28,6 +29,12 @@ let UserController = class UserController {
28
29
  async getUsers(paginationParams) {
29
30
  return this.userService.getUsers(paginationParams);
30
31
  }
32
+ async listRoles(userId, paginationParams) {
33
+ return this.userService.listRoles(userId, paginationParams);
34
+ }
35
+ async updateRoles(userId, data) {
36
+ return this.userService.updateRoles(userId, data);
37
+ }
31
38
  async show(userId) {
32
39
  return this.userService.get(userId);
33
40
  }
@@ -46,7 +53,6 @@ let UserController = class UserController {
46
53
  };
47
54
  exports.UserController = UserController;
48
55
  __decorate([
49
- (0, common_1.UseGuards)(auth_guard_1.AuthGuard),
50
56
  (0, common_1.Get)(),
51
57
  __param(0, (0, pagination_1.Pagination)()),
52
58
  __metadata("design:type", Function),
@@ -54,7 +60,22 @@ __decorate([
54
60
  __metadata("design:returntype", Promise)
55
61
  ], UserController.prototype, "getUsers", null);
56
62
  __decorate([
57
- (0, common_1.UseGuards)(auth_guard_1.AuthGuard),
63
+ (0, common_1.Get)(':userId/roles'),
64
+ __param(0, (0, common_1.Param)('userId', common_1.ParseIntPipe)),
65
+ __param(1, (0, pagination_1.Pagination)()),
66
+ __metadata("design:type", Function),
67
+ __metadata("design:paramtypes", [Number, Object]),
68
+ __metadata("design:returntype", Promise)
69
+ ], UserController.prototype, "listRoles", null);
70
+ __decorate([
71
+ (0, common_1.Patch)(':userId/roles'),
72
+ __param(0, (0, common_1.Param)('userId', common_1.ParseIntPipe)),
73
+ __param(1, (0, common_1.Body)()),
74
+ __metadata("design:type", Function),
75
+ __metadata("design:paramtypes", [Number, update_roles_dto_1.UpdateRolesDTO]),
76
+ __metadata("design:returntype", Promise)
77
+ ], UserController.prototype, "updateRoles", null);
78
+ __decorate([
58
79
  (0, common_1.Get)(':userId'),
59
80
  __param(0, (0, common_1.Param)('userId', common_1.ParseIntPipe)),
60
81
  __metadata("design:type", Function),
@@ -62,7 +83,6 @@ __decorate([
62
83
  __metadata("design:returntype", Promise)
63
84
  ], UserController.prototype, "show", null);
64
85
  __decorate([
65
- (0, common_1.UseGuards)(auth_guard_1.AuthGuard),
66
86
  (0, common_1.Post)(),
67
87
  __param(0, (0, common_1.Body)()),
68
88
  __metadata("design:type", Function),
@@ -70,7 +90,6 @@ __decorate([
70
90
  __metadata("design:returntype", void 0)
71
91
  ], UserController.prototype, "create", null);
72
92
  __decorate([
73
- (0, common_1.UseGuards)(auth_guard_1.AuthGuard),
74
93
  (0, common_1.Patch)(':userId'),
75
94
  __param(0, (0, common_1.Param)('userId', common_1.ParseIntPipe)),
76
95
  __param(1, (0, common_1.Body)()),
@@ -79,7 +98,6 @@ __decorate([
79
98
  __metadata("design:returntype", Promise)
80
99
  ], UserController.prototype, "update", null);
81
100
  __decorate([
82
- (0, common_1.UseGuards)(auth_guard_1.AuthGuard),
83
101
  (0, common_1.Delete)(),
84
102
  __param(0, (0, common_1.Body)()),
85
103
  __metadata("design:type", Function),
@@ -87,7 +105,8 @@ __decorate([
87
105
  __metadata("design:returntype", Promise)
88
106
  ], UserController.prototype, "delete", null);
89
107
  exports.UserController = UserController = __decorate([
90
- (0, permission_decorator_1.Permission)(),
108
+ (0, role_decorator_1.Role)(),
109
+ (0, common_1.UseGuards)(auth_guard_1.AuthGuard),
91
110
  (0, common_1.Controller)('users'),
92
111
  __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => user_service_1.UserService))),
93
112
  __metadata("design:paramtypes", [user_service_1.UserService])
@@ -1 +1 @@
1
- {"version":3,"file":"user.controller.js","sourceRoot":"","sources":["../../src/user/user.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAYwB;AACxB,iDAA6C;AAC7C,iDAA6C;AAC7C,iDAA6C;AAC7C,iDAA6C;AAC7C,wFAA2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EAAE,qBAAY,CAAC,CAAA;IAC7B,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,sBAAS;;4CAMxB;AAGK;IADL,IAAA,eAAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;4CAEnC;yBAnDU,cAAc;IAH1B,IAAA,qBAAI,GAAE;IACN,IAAA,kBAAS,EAAC,sBAAS,CAAC;IACpB,IAAA,mBAAU,EAAC,OAAO,CAAC;IAGf,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC,CAAC,CAAA;qCACR,0BAAW;GAHhC,cAAc,CAoD1B"}
@@ -3,10 +3,13 @@ import { PrismaService } from '@hedhog/prisma';
3
3
  import { CreateDTO } from './dto/create.dto';
4
4
  import { DeleteDTO } from './dto/delete.dto';
5
5
  import { UpdateDTO } from './dto/update.dto';
6
+ import { UpdateRolesDTO } from './dto/update-roles.dto';
6
7
  export declare class UserService {
7
8
  private readonly prismaService;
8
9
  private readonly paginationService;
9
10
  constructor(prismaService: PrismaService, paginationService: PaginationService);
11
+ listRoles(userId: number, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
12
+ updateRoles(userId: number, { ids }: UpdateRolesDTO): Promise<any>;
10
13
  getUsers(paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
11
14
  get(userId: number): Promise<any>;
12
15
  hashPassword(password: string): Promise<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"user.service.d.ts","sourceRoot":"","sources":["../../src/user/user.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAS/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;A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WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,cAAc;IAkBnD,QAAQ,CAAC,gBAAgB,EAAE,aAAa;IAkBxC,GAAG,CAAC,MAAM,EAAE,MAAM;IAIlB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAK/C,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS;IAY3C,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;CAoBhC"}
@@ -23,6 +23,37 @@ let UserService = class UserService {
23
23
  this.prismaService = prismaService;
24
24
  this.paginationService = paginationService;
25
25
  }
26
+ async listRoles(userId, paginationParams) {
27
+ return this.paginationService.paginate(this.prismaService.roles, paginationParams, {
28
+ include: {
29
+ role_users: {
30
+ where: {
31
+ user_id: userId,
32
+ },
33
+ select: {
34
+ user_id: true,
35
+ role_id: true,
36
+ },
37
+ },
38
+ },
39
+ });
40
+ }
41
+ async updateRoles(userId, { ids }) {
42
+ await this.prismaService.roles.deleteMany({
43
+ where: {
44
+ user_id: userId,
45
+ },
46
+ });
47
+ return this.prismaService.roles.createMany({
48
+ data: ids.map((role) => {
49
+ return {
50
+ user_id: userId,
51
+ role_id: role,
52
+ };
53
+ }),
54
+ skipDuplicates: true,
55
+ });
56
+ }
26
57
  async getUsers(paginationParams) {
27
58
  const fields = ['name', 'email'];
28
59
  const OR = this.prismaService.createInsensitiveSearch(fields, paginationParams);
@@ -1 +1 @@
1
- {"version":3,"file":"user.service.js","sourceRoot":"","sources":["../../src/user/user.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAsE;AACtE,2CAA+C;AAC/C,2CAKwB;AACxB,mCAAuC;AACvC,+DAAyD;AAM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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,WAAW,CAgHvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedhog/admin",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -137,6 +137,10 @@ export class Migrate implements MigrationInterface {
137
137
  url: '/users/:userId',
138
138
  method: 'GET',
139
139
  },
140
+ {
141
+ url: '/users/:userId/roles',
142
+ method: 'GET',
143
+ },
140
144
  {
141
145
  url: '/users',
142
146
  method: 'POST',
@@ -145,6 +149,10 @@ export class Migrate implements MigrationInterface {
145
149
  url: '/users/:userId',
146
150
  method: 'PATCH',
147
151
  },
152
+ {
153
+ url: '/users/:userId/roles',
154
+ method: 'PATCH',
155
+ },
148
156
  {
149
157
  url: '/users',
150
158
  method: 'DELETE',
@@ -1,3 +0,0 @@
1
- export declare const WITH_PERMISSION = "withPermission";
2
- export declare const Permission: () => import("@nestjs/common").CustomDecorator<string>;
3
- //# sourceMappingURL=permission.decorator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"permission.decorator.d.ts","sourceRoot":"","sources":["../../../src/permission/decorators/permission.decorator.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAChD,eAAO,MAAM,UAAU,wDAA2C,CAAC"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Permission = exports.WITH_PERMISSION = void 0;
4
- const common_1 = require("@nestjs/common");
5
- exports.WITH_PERMISSION = 'withPermission';
6
- const Permission = () => (0, common_1.SetMetadata)(exports.WITH_PERMISSION, true);
7
- exports.Permission = Permission;
8
- //# sourceMappingURL=permission.decorator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"permission.decorator.js","sourceRoot":"","sources":["../../../src/permission/decorators/permission.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAA6C;AAEhC,QAAA,eAAe,GAAG,gBAAgB,CAAC;AACzC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,IAAA,oBAAW,EAAC,uBAAe,EAAE,IAAI,CAAC,CAAC;AAAtD,QAAA,UAAU,cAA4C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/permission/dto/create.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAGpB,IAAI,EAAE,MAAM,CAAC;IAIb,WAAW,EAAE,MAAM,CAAC;CACrB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/permission/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AAEvD,MAAa,SAAS;CAQrB;AARD,8BAQC;AALC;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;IACnD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;;uCACpC;AAIb;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,iCAAiC,EAAE,CAAC;IACxD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;;8CAClC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete.dto.d.ts","sourceRoot":"","sources":["../../../src/permission/dto/delete.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAIpB,GAAG,EAAE,MAAM,EAAE,CAAC;CACf"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete.dto.js","sourceRoot":"","sources":["../../../src/permission/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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/permission/dto/update.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAGpB,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"update.dto.js","sourceRoot":"","sources":["../../../src/permission/dto/update.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AAEvD,MAAa,SAAS;CAQrB;AARD,8BAQC;AALC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;;uCACtC;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,iCAAiC,EAAE,CAAC;;8CACpC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"permission.guard.d.ts","sourceRoot":"","sources":["../../../src/permission/guards/permission.guard.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,gBAAgB,EAMjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,qBACa,eAAgB,YAAW,WAAW;IAE/C,OAAO,CAAC,SAAS;IAEjB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAFf,SAAS,EAAE,SAAS,EAEX,MAAM,EAAE,aAAa;IAGlC,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IAoF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BACX,IAAI,EAAE;wBACJ,KAAK,EAAE;4BACL,UAAU,EAAE;gCACV,IAAI,EAAE;oCACJ,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;iCACxB;6BACF;yBACF;qBACF;iBACF;aACF;SACF,CAAC,CAAC;QAEH,OAAO,KAAK,KAAK,CAAC,CAAC;IACrB,CAAC;IAEO,sBAAsB,CAAC,OAAgB;;QAC7C,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAA,MAAA,OAAO,CAAC,OAAO,CAAC,aAAa,0CAAE,KAAK,CAAC,GAAG,CAAC,mCAAI,EAAE,CAAC;QACtE,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/C,CAAC;CACF,CAAA;AA/FY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;IAIR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,sBAAa,CAAC,CAAC,CAAA;qCADrB,gBAAS;QAEH,sBAAa;GAJ7B,eAAe,CA+F3B"}
@@ -1,14 +0,0 @@
1
- import { CreateDTO } from './dto/create.dto';
2
- import { DeleteDTO } from './dto/delete.dto';
3
- import { UpdateDTO } from './dto/update.dto';
4
- import { PermissionService } from './permission.service';
5
- export declare class PermissionController {
6
- private readonly permissionService;
7
- constructor(permissionService: PermissionService);
8
- getPermissions(paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
9
- show(permissionId: number): Promise<any>;
10
- create(data: CreateDTO): Promise<any>;
11
- update(permissionId: number, data: UpdateDTO): Promise<any>;
12
- delete(data: DeleteDTO): Promise<any>;
13
- }
14
- //# sourceMappingURL=permission.controller.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"permission.controller.d.ts","sourceRoot":"","sources":["../../src/permission/permission.controller.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,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0 @@
1
- export declare class PermissionModule {
2
- }
3
- //# sourceMappingURL=permission.module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"permission.module.d.ts","sourceRoot":"","sources":["../../src/permission/permission.module.ts"],"names":[],"mappings":"AASA,qBAgBa,gBAAgB;CAAG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"permission.module.js","sourceRoot":"","sources":["../../src/permission/permission.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,qDAAiD;AACjD,mDAAsD;AACtD,2CAA8C;AAC9C,2CAAoD;AACpD,6DAAyD;AACzD,mEAA+D;AAC/D,gEAA4D;AAC5D,uCAAyC;AAkBlC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAhB5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6BAAgB,CAAC;SACnC;QACD,WAAW,EAAE,CAAC,4CAAoB,CAAC;QACnC,SAAS,EAAE;YACT,sCAAiB;YACjB;gBACE,OAAO,EAAE,gBAAS;gBAClB,QAAQ,EAAE,kCAAe;aAC1B;SACF;QACD,OAAO,EAAE,CAAC,sCAAiB,CAAC;KAC7B,CAAC;GACW,gBAAgB,CAAG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"permission.service.d.ts","sourceRoot":"","sources":["../../src/permission/permission.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,CA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number;
3
- name: string;
4
- slug: string;
5
- description: string;
6
- active: boolean;
7
- created_at: string;
8
- updated_at: string;
9
- };
10
- export type RoleType = {
11
- id: number;
12
- name: string;
13
- slug: string;
14
- description: string;
15
- active: boolean;
16
- created_at: string;
17
- updated_at: string;
18
- };
19
- export type RolePermissionType = {
20
- id: number;
21
- role_id: number;
22
- permission_id: number;
23
- created_at: string;
24
- updated_at: string;
25
- };
26
- export type RoleUserType = {
27
- id: number;
28
- role_id: number;
29
- user_id: number;
30
- created_at: string;
31
- updated_at: string;
32
- };
33
- //# sourceMappingURL=permission.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"permission.types.d.ts","sourceRoot":"","sources":["../../../src/permission/types/permission.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=permission.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"permission.types.js","sourceRoot":"","sources":["../../../src/permission/types/permission.types.ts"],"names":[],"mappings":""}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes