@hedhog/admin 0.0.20 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. package/dist/admin.module.d.ts.map +1 -1
  2. package/dist/admin.module.js +10 -1
  3. package/dist/admin.module.js.map +1 -1
  4. package/dist/dto/delete.dto.d.ts.map +1 -0
  5. package/dist/dto/delete.dto.js.map +1 -0
  6. package/dist/menu/menu.controller.d.ts +3 -3
  7. package/dist/menu/menu.controller.d.ts.map +1 -1
  8. package/dist/menu/menu.controller.js +9 -7
  9. package/dist/menu/menu.controller.js.map +1 -1
  10. package/dist/menu/menu.service.d.ts +3 -3
  11. package/dist/menu/menu.service.d.ts.map +1 -1
  12. package/dist/menu/menu.service.js +18 -10
  13. package/dist/menu/menu.service.js.map +1 -1
  14. package/dist/role/role.controller.d.ts +5 -5
  15. package/dist/role/role.controller.d.ts.map +1 -1
  16. package/dist/role/role.controller.js +21 -17
  17. package/dist/role/role.controller.js.map +1 -1
  18. package/dist/role/role.service.d.ts +5 -5
  19. package/dist/role/role.service.d.ts.map +1 -1
  20. package/dist/role/role.service.js +52 -12
  21. package/dist/role/role.service.js.map +1 -1
  22. package/dist/route/dto/create.dto.d.ts +6 -0
  23. package/dist/route/dto/create.dto.d.ts.map +1 -0
  24. package/dist/{screen/dto/delete.dto.js → route/dto/create.dto.js} +14 -9
  25. package/dist/route/dto/create.dto.js.map +1 -0
  26. package/dist/route/dto/update.dto.d.ts +6 -0
  27. package/dist/route/dto/update.dto.d.ts.map +1 -0
  28. package/dist/{menu/dto/delete.dto.js → route/dto/update.dto.js} +16 -10
  29. package/dist/route/dto/update.dto.js.map +1 -0
  30. package/dist/route/route.controller.d.ts +20 -0
  31. package/dist/route/route.controller.d.ts.map +1 -0
  32. package/dist/route/route.controller.js +133 -0
  33. package/dist/route/route.controller.js.map +1 -0
  34. package/dist/route/route.module.d.ts +3 -0
  35. package/dist/route/route.module.d.ts.map +1 -0
  36. package/dist/route/route.module.js +31 -0
  37. package/dist/route/route.module.js.map +1 -0
  38. package/dist/route/route.service.d.ts +24 -0
  39. package/dist/route/route.service.d.ts.map +1 -0
  40. package/dist/route/route.service.js +121 -0
  41. package/dist/route/route.service.js.map +1 -0
  42. package/dist/screen/screen.controller.d.ts +3 -3
  43. package/dist/screen/screen.controller.d.ts.map +1 -1
  44. package/dist/screen/screen.controller.js +9 -7
  45. package/dist/screen/screen.controller.js.map +1 -1
  46. package/dist/screen/screen.service.d.ts +4 -4
  47. package/dist/screen/screen.service.d.ts.map +1 -1
  48. package/dist/screen/screen.service.js +34 -16
  49. package/dist/screen/screen.service.js.map +1 -1
  50. package/dist/types/http-method.d.ts +2 -0
  51. package/dist/types/http-method.d.ts.map +1 -0
  52. package/dist/types/http-method.js +3 -0
  53. package/dist/types/http-method.js.map +1 -0
  54. package/dist/user/user.controller.d.ts +1 -1
  55. package/dist/user/user.controller.d.ts.map +1 -1
  56. package/dist/user/user.controller.js +1 -1
  57. package/dist/user/user.controller.js.map +1 -1
  58. package/dist/user/user.service.d.ts +1 -1
  59. package/dist/user/user.service.d.ts.map +1 -1
  60. package/dist/user/user.service.js +2 -2
  61. package/dist/user/user.service.js.map +1 -1
  62. package/package.json +1 -1
  63. package/src/migrations/migrate-02.ts +6 -0
  64. package/src/migrations/migrate-03.ts +9 -1
  65. package/src/migrations/migrate-04.ts +52 -0
  66. package/src/migrations/migrate-12.ts +8 -0
  67. package/dist/menu/dto/delete.dto.d.ts.map +0 -1
  68. package/dist/menu/dto/delete.dto.js.map +0 -1
  69. package/dist/role/dto/delete.dto.d.ts +0 -4
  70. package/dist/role/dto/delete.dto.d.ts.map +0 -1
  71. package/dist/role/dto/delete.dto.js.map +0 -1
  72. package/dist/screen/dto/delete.dto.d.ts +0 -4
  73. package/dist/screen/dto/delete.dto.d.ts.map +0 -1
  74. package/dist/screen/dto/delete.dto.js.map +0 -1
  75. package/dist/user/dto/delete.dto.d.ts +0 -4
  76. package/dist/user/dto/delete.dto.d.ts.map +0 -1
  77. package/dist/user/dto/delete.dto.js +0 -23
  78. package/dist/user/dto/delete.dto.js.map +0 -1
  79. /package/dist/{menu/dto → dto}/delete.dto.d.ts +0 -0
  80. /package/dist/{role/dto → dto}/delete.dto.js +0 -0
@@ -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,0DAAsD;AACtD,sEAAyD;AACzD,0DAAqD;AAK9C,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,YAEmB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;IACxC,CAAC;IAGE,AAAN,KAAK,CAAC,QAAQ,CAAe,gBAAgB;QAC3C,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IACrD,CAAC;IAGK,AAAN,KAAK,CAAC,SAAS,CACkB,MAAc,EAC/B,gBAAgB;QAE9B,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC9D,CAAC;IAGK,AAAN,KAAK,CAAC,WAAW,CACgB,MAAc,EACrC,IAAkB;QAE1B,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACpD,CAAC;IAGK,AAAN,KAAK,CAAC,IAAI,CAAgC,MAAc;QACtD,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAGD,MAAM,CAAS,IAAe;QAC5B,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CACqB,MAAc,EACrC,IAAe;QAEvB,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;YAC7B,EAAE,EAA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,7 @@
1
1
  import { PaginationDTO, PaginationService } from '@hedhog/pagination';
2
2
  import { PrismaService } from '@hedhog/prisma';
3
3
  import { CreateDTO } from './dto/create.dto';
4
- import { DeleteDTO } from './dto/delete.dto';
4
+ import { DeleteDTO } from '../dto/delete.dto';
5
5
  import { UpdateDTO } from './dto/update.dto';
6
6
  import { UpdateIdsDTO } from '../dto/update-ids.dto';
7
7
  export declare class UserService {
@@ -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;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBACa,WAAW;IAGpB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa;IAoBzD,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,YAAY;IAkBjD,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,EAA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-39,12 +39,12 @@ let UserService = class UserService {
39
39
  });
40
40
  }
41
41
  async updateRoles(userId, { ids }) {
42
- await this.prismaService.roles.deleteMany({
42
+ await this.prismaService.role_users.deleteMany({
43
43
  where: {
44
44
  user_id: userId,
45
45
  },
46
46
  });
47
- return this.prismaService.roles.createMany({
47
+ return this.prismaService.role_users.createMany({
48
48
  data: ids.map((role) => {
49
49
  return {
50
50
  user_id: userId,
@@ -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;AAOlD,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,SAAS,CAAC,MAAc,EAAE,gBAA+B;QAC7D,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,KAAK,EACxB,gBAAgB,EAChB;YACE,OAAO,EAAE;gBACP,UAAU,EAAE;oBACV,KAAK,EAAE;wBACL,OAAO,EAAE,MAAM;qBAChB;oBACD,MAAM,EAAE;wBACN,OAAO,EAAE,IAAI;wBACb,OAAO,EAAE,IAAI;qBACd;iBACF;aACF;SACF,CACF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,MAAc,EAAE,EAAE,GAAG,EAAgB;QACrD,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC;YACxC,KAAK,EAAE;gBACL,OAAO,EAAE,MAAM;aAChB;SACF,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC;YACzC,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,C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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,WAAW,CAgHvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedhog/admin",
3
- "version": "0.0.20",
3
+ "version": "0.0.23",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -62,6 +62,12 @@ export class Migrate implements MigrationInterface {
62
62
  description: 'Check all menus registered in the system.',
63
63
  icon: 'menu',
64
64
  },
65
+ {
66
+ name: 'Routes',
67
+ slug: '/management/routes',
68
+ description: 'Check all routes registered in the system.',
69
+ icon: 'route',
70
+ },
65
71
  ])
66
72
  .execute();
67
73
  }
@@ -117,7 +117,7 @@ export class Migrate implements MigrationInterface {
117
117
  '/management/screens',
118
118
  2,
119
119
  managementId,
120
- 'screem',
120
+ 'device-tv',
121
121
  );
122
122
  await this.insertMenu(
123
123
  queryRunner,
@@ -127,6 +127,14 @@ export class Migrate implements MigrationInterface {
127
127
  managementId,
128
128
  'menu',
129
129
  );
130
+ await this.insertMenu(
131
+ queryRunner,
132
+ 'Routes',
133
+ '/management/routes',
134
+ 4,
135
+ managementId,
136
+ 'route',
137
+ );
130
138
  }
131
139
 
132
140
  private async insertMenu(
@@ -61,6 +61,22 @@ export class Migrate implements MigrationInterface {
61
61
  url: '/menus/:menuId',
62
62
  method: 'PATCH',
63
63
  },
64
+ {
65
+ url: '/menus/:menuId/roles',
66
+ method: 'GET',
67
+ },
68
+ {
69
+ url: '/menus/:menuId/roles',
70
+ method: 'PATCH',
71
+ },
72
+ {
73
+ url: '/menus/:menuId/screens',
74
+ method: 'GET',
75
+ },
76
+ {
77
+ url: '/menus/:menuId/screens',
78
+ method: 'PATCH',
79
+ },
64
80
  {
65
81
  url: '/menus',
66
82
  method: 'DELETE',
@@ -205,6 +221,42 @@ export class Migrate implements MigrationInterface {
205
221
  url: '/users',
206
222
  method: 'DELETE',
207
223
  },
224
+ {
225
+ url: '/routes',
226
+ method: 'GET',
227
+ },
228
+ {
229
+ url: '/routes',
230
+ method: 'POST',
231
+ },
232
+ {
233
+ url: '/routes',
234
+ method: 'DELETE',
235
+ },
236
+ {
237
+ url: '/routes/:routeId',
238
+ method: 'GET',
239
+ },
240
+ {
241
+ url: '/routes/:routeId',
242
+ method: 'PATCH',
243
+ },
244
+ {
245
+ url: '/routes/:routeId/roles',
246
+ method: 'GET',
247
+ },
248
+ {
249
+ url: '/routes/:routeId/roles',
250
+ method: 'PATCH',
251
+ },
252
+ {
253
+ url: '/routes/:routeId/screens',
254
+ method: 'GET',
255
+ },
256
+ {
257
+ url: '/routes/:routeId/screens',
258
+ method: 'PATCH',
259
+ },
208
260
  ])
209
261
  .execute();
210
262
  }
@@ -30,11 +30,19 @@ export class Migrate implements MigrationInterface {
30
30
  .where('slug = :slug', { slug: '/management/menus' })
31
31
  .execute();
32
32
 
33
+ const screenIdRoute = await queryRunner.manager
34
+ .createQueryBuilder()
35
+ .select()
36
+ .from('screens', 's')
37
+ .where('slug = :slug', { slug: '/management/routes' })
38
+ .execute();
39
+
33
40
  for (const { url, screendId } of [
34
41
  { url: '/screens%', screendId: screenIdScreen[0].id },
35
42
  { url: '/roles%', screendId: screenIdRole[0].id },
36
43
  { url: '/users%', screendId: screenIdUser[0].id },
37
44
  { url: '/menus%', screendId: screenIdMenu[0].id },
45
+ { url: '/routes%', screendId: screenIdRoute[0].id },
38
46
  ]) {
39
47
  const routesScreens = await queryRunner.manager
40
48
  .createQueryBuilder()
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete.dto.d.ts","sourceRoot":"","sources":["../../../src/menu/dto/delete.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAKpB,GAAG,EAAE,MAAM,EAAE,CAAC;CACf"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete.dto.js","sourceRoot":"","sources":["../../../src/menu/dto/delete.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA8E;AAE9E,MAAa,SAAS;CAMrB;AAND,8BAMC;AADC;IAJC,IAAA,yBAAO,GAAE;IACT,IAAA,+BAAa,GAAE;IACf,IAAA,8BAAY,EAAC,CAAC,CAAC;IACf,IAAA,uBAAK,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;sCACR"}
@@ -1,4 +0,0 @@
1
- export declare class DeleteDTO {
2
- ids: number[];
3
- }
4
- //# sourceMappingURL=delete.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete.dto.d.ts","sourceRoot":"","sources":["../../../src/role/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/role/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,4 +0,0 @@
1
- export declare class DeleteDTO {
2
- ids: number[];
3
- }
4
- //# sourceMappingURL=delete.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete.dto.d.ts","sourceRoot":"","sources":["../../../src/screen/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/screen/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,4 +0,0 @@
1
- export declare class DeleteDTO {
2
- ids: number[];
3
- }
4
- //# sourceMappingURL=delete.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete.dto.d.ts","sourceRoot":"","sources":["../../../src/user/dto/delete.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAIpB,GAAG,EAAE,MAAM,EAAE,CAAC;CACf"}
@@ -1,23 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete.dto.js","sourceRoot":"","sources":["../../../src/user/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"}
File without changes
File without changes