@hedhog/admin 0.0.103 → 0.0.105

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. package/README.md +141 -141
  2. package/dist/admin.module.js +7 -7
  3. package/dist/admin.module.js.map +1 -1
  4. package/dist/auth/auth.service.d.ts +1 -1
  5. package/dist/auth/auth.service.d.ts.map +1 -1
  6. package/dist/auth/auth.service.js +8 -8
  7. package/dist/auth/auth.service.js.map +1 -1
  8. package/dist/auth/auth.service.spec.js +16 -16
  9. package/dist/auth/auth.service.spec.js.map +1 -1
  10. package/dist/dto/with-locale.dto.d.ts +4 -0
  11. package/dist/dto/with-locale.dto.d.ts.map +1 -0
  12. package/dist/dto/{with-locales.dto.js → with-locale.dto.js} +5 -5
  13. package/dist/dto/with-locale.dto.js.map +1 -0
  14. package/dist/index.d.ts +2 -2
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +2 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/locale/locale.controller.js +1 -1
  19. package/dist/locale/locale.controller.js.map +1 -1
  20. package/dist/locale/locale.middleware.d.ts +1 -1
  21. package/dist/locale/locale.middleware.d.ts.map +1 -1
  22. package/dist/locale/locale.middleware.js +2 -2
  23. package/dist/locale/locale.middleware.js.map +1 -1
  24. package/dist/locale/locale.service.d.ts +6 -6
  25. package/dist/locale/locale.service.d.ts.map +1 -1
  26. package/dist/locale/locale.service.js +40 -40
  27. package/dist/locale/locale.service.js.map +1 -1
  28. package/dist/locale/locale.service.spec.js +14 -14
  29. package/dist/locale/locale.service.spec.js.map +1 -1
  30. package/dist/menu/menu.controller.js +3 -3
  31. package/dist/menu/menu.controller.js.map +1 -1
  32. package/dist/menu/menu.service.d.ts +3 -3
  33. package/dist/menu/menu.service.d.ts.map +1 -1
  34. package/dist/menu/menu.service.js +35 -35
  35. package/dist/menu/menu.service.js.map +1 -1
  36. package/dist/menu/menu.service.spec.js +33 -37
  37. package/dist/menu/menu.service.spec.js.map +1 -1
  38. package/dist/role/dto/create.dto.d.ts +2 -2
  39. package/dist/role/dto/create.dto.d.ts.map +1 -1
  40. package/dist/role/dto/create.dto.js +2 -2
  41. package/dist/role/dto/create.dto.js.map +1 -1
  42. package/dist/role/guards/role.guard.js +4 -4
  43. package/dist/role/guards/role.guard.js.map +1 -1
  44. package/dist/role/role.controller.js +7 -7
  45. package/dist/role/role.controller.js.map +1 -1
  46. package/dist/role/role.service.d.ts +2 -2
  47. package/dist/role/role.service.d.ts.map +1 -1
  48. package/dist/role/role.service.js +35 -35
  49. package/dist/role/role.service.js.map +1 -1
  50. package/dist/role/role.service.spec.d.ts +0 -1
  51. package/dist/role/role.service.spec.js +400 -340
  52. package/dist/role/role.service.spec.js.map +1 -1
  53. package/dist/route/route.controller.js +3 -3
  54. package/dist/route/route.controller.js.map +1 -1
  55. package/dist/route/route.service.d.ts +2 -2
  56. package/dist/route/route.service.d.ts.map +1 -1
  57. package/dist/route/route.service.js +18 -18
  58. package/dist/route/route.service.js.map +1 -1
  59. package/dist/route/route.service.spec.js +27 -27
  60. package/dist/route/route.service.spec.js.map +1 -1
  61. package/dist/screen/screen.controller.js +4 -4
  62. package/dist/screen/screen.controller.js.map +1 -1
  63. package/dist/screen/screen.service.d.ts +2 -2
  64. package/dist/screen/screen.service.d.ts.map +1 -1
  65. package/dist/screen/screen.service.js +16 -16
  66. package/dist/screen/screen.service.js.map +1 -1
  67. package/dist/screen/screen.service.spec.js +16 -16
  68. package/dist/screen/screen.service.spec.js.map +1 -1
  69. package/dist/setting/dto/setting.dto.d.ts +9 -0
  70. package/dist/setting/dto/setting.dto.d.ts.map +1 -0
  71. package/dist/setting/dto/{settings.dto.js → setting.dto.js} +6 -6
  72. package/dist/setting/dto/setting.dto.js.map +1 -0
  73. package/dist/setting/{settings.controller.d.ts → setting.controller.d.ts} +6 -6
  74. package/dist/setting/setting.controller.d.ts.map +1 -0
  75. package/dist/setting/{settings.controller.js → setting.controller.js} +20 -20
  76. package/dist/setting/setting.controller.js.map +1 -0
  77. package/dist/setting/setting.module.d.ts +3 -0
  78. package/dist/setting/setting.module.d.ts.map +1 -0
  79. package/dist/setting/{settings.module.js → setting.module.js} +6 -6
  80. package/dist/setting/setting.module.js.map +1 -0
  81. package/dist/setting/{settings.service.d.ts → setting.service.d.ts} +4 -4
  82. package/dist/setting/setting.service.d.ts.map +1 -0
  83. package/dist/setting/{settings.service.js → setting.service.js} +42 -42
  84. package/dist/setting/setting.service.js.map +1 -0
  85. package/dist/setting/setting.service.spec.d.ts +2 -0
  86. package/dist/setting/setting.service.spec.d.ts.map +1 -0
  87. package/dist/setting/{settings.service.spec.js → setting.service.spec.js} +17 -17
  88. package/dist/setting/setting.service.spec.js.map +1 -0
  89. package/dist/user/user.controller.js +3 -3
  90. package/dist/user/user.controller.js.map +1 -1
  91. package/dist/user/user.service.d.ts +2 -2
  92. package/dist/user/user.service.d.ts.map +1 -1
  93. package/dist/user/user.service.js +9 -9
  94. package/dist/user/user.service.js.map +1 -1
  95. package/dist/user/user.service.spec.js +24 -24
  96. package/dist/user/user.service.spec.js.map +1 -1
  97. package/package.json +2 -2
  98. package/src/admin.module.ts +36 -0
  99. package/src/auth/auth.controller.ts +48 -0
  100. package/src/auth/auth.module.ts +39 -0
  101. package/src/auth/auth.service.spec.ts +196 -0
  102. package/src/auth/auth.service.ts +175 -0
  103. package/src/auth/decorators/public.decorator.ts +4 -0
  104. package/src/auth/decorators/user.decorator.ts +17 -0
  105. package/src/auth/dto/forget.dto.ts +6 -0
  106. package/src/auth/dto/login.dto.ts +15 -0
  107. package/src/auth/dto/otp.dto.ts +11 -0
  108. package/src/auth/enums/multifactor-type.enum.ts +4 -0
  109. package/src/auth/guards/auth.guard.ts +50 -0
  110. package/src/auth/types/user.type.ts +8 -0
  111. package/src/dto/delete.dto.ts +8 -0
  112. package/src/dto/update-ids.dto.ts +9 -0
  113. package/src/dto/with-locale.dto.ts +8 -0
  114. package/src/index.ts +34 -0
  115. package/src/locale/dto/create.dto.ts +12 -0
  116. package/src/locale/dto/delete.dto.ts +8 -0
  117. package/src/locale/dto/set-enabled.dto.ts +9 -0
  118. package/src/locale/dto/update.dto.ts +15 -0
  119. package/src/locale/index.ts +4 -0
  120. package/src/locale/locale.controller.ts +79 -0
  121. package/src/locale/locale.decorator.ts +8 -0
  122. package/src/locale/locale.middleware.ts +34 -0
  123. package/src/locale/locale.module.ts +23 -0
  124. package/src/locale/locale.service.spec.ts +193 -0
  125. package/src/locale/locale.service.ts +366 -0
  126. package/src/menu/dto/create.dto.ts +25 -0
  127. package/src/menu/dto/order.dto.ts +8 -0
  128. package/src/menu/dto/update.dto.ts +19 -0
  129. package/src/menu/menu.controller.ts +106 -0
  130. package/src/menu/menu.module.ts +18 -0
  131. package/src/menu/menu.service.spec.ts +247 -0
  132. package/src/menu/menu.service.ts +263 -0
  133. package/src/role/decorators/role.decorator.ts +4 -0
  134. package/src/role/dto/create.dto.ts +7 -0
  135. package/src/role/dto/update.dto.ts +4 -0
  136. package/src/role/guards/role.guard.ts +122 -0
  137. package/src/role/role.controller.ts +126 -0
  138. package/src/role/role.module.ts +28 -0
  139. package/src/role/role.service.spec.ts +417 -0
  140. package/src/role/role.service.ts +302 -0
  141. package/src/route/dto/create.dto.ts +13 -0
  142. package/src/route/dto/update.dto.ts +15 -0
  143. package/src/route/route.controller.ts +91 -0
  144. package/src/route/route.module.ts +18 -0
  145. package/src/route/route.service.spec.ts +299 -0
  146. package/src/route/route.service.ts +164 -0
  147. package/src/screen/dto/create.dto.ts +19 -0
  148. package/src/screen/dto/update.dto.ts +19 -0
  149. package/src/screen/screen.controller.ts +93 -0
  150. package/src/screen/screen.module.ts +18 -0
  151. package/src/screen/screen.service.spec.ts +298 -0
  152. package/src/screen/screen.service.ts +181 -0
  153. package/src/setting/dto/create.dto.ts +1 -0
  154. package/src/setting/dto/setting-user.dto.ts +6 -0
  155. package/src/setting/dto/setting.dto.ts +17 -0
  156. package/src/setting/dto/update.dto.ts +3 -0
  157. package/src/setting/setting.controller.ts +100 -0
  158. package/src/setting/setting.module.ts +18 -0
  159. package/src/setting/setting.service.spec.ts +183 -0
  160. package/src/setting/setting.service.ts +346 -0
  161. package/src/types/http-method.ts +8 -0
  162. package/src/user/constants/user.constants.ts +1 -0
  163. package/src/user/dto/create.dto.ts +24 -0
  164. package/src/user/dto/update.dto.ts +41 -0
  165. package/src/user/user.controller.ts +75 -0
  166. package/src/user/user.module.ts +18 -0
  167. package/src/user/user.service.spec.ts +294 -0
  168. package/src/user/user.service.ts +129 -0
  169. package/tsconfig.lib.json +9 -0
  170. package/tsconfig.production.json +20 -0
  171. package/dist/dto/with-locales.dto.d.ts +0 -4
  172. package/dist/dto/with-locales.dto.d.ts.map +0 -1
  173. package/dist/dto/with-locales.dto.js.map +0 -1
  174. package/dist/setting/dto/settings.dto.d.ts +0 -9
  175. package/dist/setting/dto/settings.dto.d.ts.map +0 -1
  176. package/dist/setting/dto/settings.dto.js.map +0 -1
  177. package/dist/setting/settings.controller.d.ts.map +0 -1
  178. package/dist/setting/settings.controller.js.map +0 -1
  179. package/dist/setting/settings.module.d.ts +0 -3
  180. package/dist/setting/settings.module.d.ts.map +0 -1
  181. package/dist/setting/settings.module.js.map +0 -1
  182. package/dist/setting/settings.service.d.ts.map +0 -1
  183. package/dist/setting/settings.service.js.map +0 -1
  184. package/dist/setting/settings.service.spec.d.ts +0 -2
  185. package/dist/setting/settings.service.spec.d.ts.map +0 -1
  186. package/dist/setting/settings.service.spec.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"role.service.spec.js","sourceRoot":"","sources":["../../src/role/role.service.spec.ts"],"names":[],"mappings":";;AAAA,mDAI4B;AAC5B,2CAA+C;AAC/C,2CAAqD;AACrD,6CAAsD;AAGtD,iDAA6C;AAE7C,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,IAAI,WAAwB,CAAC;IAC7B,IAAI,aAA4B,CAAC;IACjC,IAAI,iBAAoC,CAAC;IAEzC,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,MAAM,GAAkB,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,7 +92,7 @@ __decorate([
92
92
  __metadata("design:returntype", Promise)
93
93
  ], RouteController.prototype, "delete", null);
94
94
  __decorate([
95
- (0, common_1.Get)(':routeId/roles'),
95
+ (0, common_1.Get)(':routeId/role'),
96
96
  __param(0, (0, common_1.Param)('routeId', common_1.ParseIntPipe)),
97
97
  __param(1, (0, pagination_1.Pagination)()),
98
98
  __param(2, (0, locale_1.Locale)()),
@@ -101,7 +101,7 @@ __decorate([
101
101
  __metadata("design:returntype", Promise)
102
102
  ], RouteController.prototype, "listRoles", null);
103
103
  __decorate([
104
- (0, common_1.Patch)(':routeId/roles'),
104
+ (0, common_1.Patch)(':routeId/role'),
105
105
  __param(0, (0, common_1.Param)('routeId', common_1.ParseIntPipe)),
106
106
  __param(1, (0, common_1.Body)()),
107
107
  __metadata("design:type", Function),
@@ -127,7 +127,7 @@ __decorate([
127
127
  ], RouteController.prototype, "updateScreens", null);
128
128
  exports.RouteController = RouteController = __decorate([
129
129
  (0, role_decorator_1.Role)(),
130
- (0, common_1.Controller)('routes'),
130
+ (0, common_1.Controller)('route'),
131
131
  __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => route_service_1.RouteService))),
132
132
  __metadata("design:paramtypes", [route_service_1.RouteService])
133
133
  ], RouteController);
@@ -1 +1 @@
1
- {"version":3,"file":"route.controller.js","sourceRoot":"","sources":["../../src/route/route.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAA+D;AAC/D,2CAWwB;AACxB,kDAA8C;AAC9C,0DAAqD;AACrD,sCAAmC;AACnC,sEAAyD;AACzD,iDAA6C;AAC7C,iDAA6C;AAC7C,mDAA+C;AAIxC,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,YAEmB,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAC1C,CAAC;IAGE,AAAN,KAAK,CAAC,SAAS,CAAe,gBAAgB;QAC5C,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,gBAAgB,CAAC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AAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;6CAEnC;AAGK;IADL,IAAA,YAAG,EAAC,eAAe,CAAC;IAElB,WAAA,IAAA,cAAK,EAAC,SAAS,EAAE,qBAAY,CAAC,CAAA;IAC9B,WAAA,IAAA,uBAAU,GAAE,CAAA;IACZ,WAAA,IAAA,eAAM,GAAE,CAAA;;6CADuB,0BAAa;;gDAI9C;AAGK;IADL,IAAA,cAAK,EAAC,eAAe,CAAC;IAEpB,WAAA,IAAA,cAAK,EAAC,SAAS,EAAE,qBAAY,CAAC,CAAA;IAC9B,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,6BAAY;;kDAG3B;AAGK;IADL,IAAA,YAAG,EAAC,kBAAkB,CAAC;IAErB,WAAA,IAAA,cAAK,EAAC,SAAS,EAAE,qBAAY,CAAC,CAAA;IAC9B,WAAA,IAAA,uBAAU,GAAE,CAAA;IACZ,WAAA,IAAA,eAAM,GAAE,CAAA;;6CADuB,0BAAa;;kDAI9C;AAGK;IADL,IAAA,cAAK,EAAC,kBAAkB,CAAC;IAEvB,WAAA,IAAA,cAAK,EAAC,SAAS,EAAE,qBAAY,CAAC,CAAA;IAC9B,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,6BAAY;;oDAG3B;0BAlEU,eAAe;IAF3B,IAAA,qBAAI,GAAE;IACN,IAAA,mBAAU,EAAC,OAAO,CAAC;IAGf,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC,CAAC,CAAA;qCACR,4BAAY;GAHlC,eAAe,CAmE3B"}
@@ -1,9 +1,9 @@
1
1
  import { PaginationDTO, PaginationService } from '@hedhog/pagination';
2
2
  import { PrismaService } from '@hedhog/prisma';
3
- import { UpdateDTO } from './dto/update.dto';
4
- import { CreateDTO } from './dto/create.dto';
5
3
  import { DeleteDTO } from '../dto/delete.dto';
6
4
  import { UpdateIdsDTO } from '../dto/update-ids.dto';
5
+ import { CreateDTO } from './dto/create.dto';
6
+ import { UpdateDTO } from './dto/update.dto';
7
7
  export declare class RouteService {
8
8
  private readonly prismaService;
9
9
  private readonly paginationService;
@@ -1 +1 @@
1
- {"version":3,"file":"route.service.d.ts","sourceRoot":"","sources":["../../src/route/route.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBACa,YAAY;IAGrB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,SAAS,CAAC,gBAAgB,EAAE,aAAa;IAmBzC,YAAY,CAAC,OAAO,EAAE,MAAM;IAI5B,MAAM,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,SAAS;IAIjC,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;IAUzB,SAAS,CACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,aAAa;IAiC3B,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;IAgB/C,WAAW,CACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,aAAa;IAgC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 -24,26 +24,26 @@ let RouteService = class RouteService {
24
24
  async getRoutes(paginationParams) {
25
25
  const fields = ['url', 'method'];
26
26
  const OR = this.prismaService.createInsensitiveSearch(fields, paginationParams);
27
- return this.paginationService.paginate(this.prismaService.routes, paginationParams, {
27
+ return this.paginationService.paginate(this.prismaService.route, paginationParams, {
28
28
  where: {
29
29
  OR,
30
30
  },
31
31
  });
32
32
  }
33
33
  async getRouteById(routeId) {
34
- return this.prismaService.routes.findUnique({ where: { id: routeId } });
34
+ return this.prismaService.route.findUnique({ where: { id: routeId } });
35
35
  }
36
36
  async create({ url, method }) {
37
- return this.prismaService.routes.create({ data: { url, method } });
37
+ return this.prismaService.route.create({ data: { url, method } });
38
38
  }
39
39
  async update({ id, data }) {
40
- return this.prismaService.routes.update({
40
+ return this.prismaService.route.update({
41
41
  where: { id },
42
42
  data,
43
43
  });
44
44
  }
45
45
  async delete({ ids }) {
46
- return this.prismaService.routes.deleteMany({
46
+ return this.prismaService.route.deleteMany({
47
47
  where: {
48
48
  id: {
49
49
  in: ids,
@@ -52,11 +52,11 @@ let RouteService = class RouteService {
52
52
  });
53
53
  }
54
54
  async listRoles(locale, routeId, paginationParams) {
55
- return this.paginationService.paginate(this.prismaService.roles, paginationParams, {
55
+ return this.paginationService.paginate(this.prismaService.role, paginationParams, {
56
56
  include: {
57
- role_translations: {
57
+ role_locale: {
58
58
  where: {
59
- locales: {
59
+ locale: {
60
60
  code: locale,
61
61
  },
62
62
  },
@@ -65,7 +65,7 @@ let RouteService = class RouteService {
65
65
  description: true,
66
66
  },
67
67
  },
68
- role_routes: {
68
+ role_route: {
69
69
  where: {
70
70
  route_id: routeId,
71
71
  },
@@ -75,15 +75,15 @@ let RouteService = class RouteService {
75
75
  },
76
76
  },
77
77
  },
78
- }, 'role_translations');
78
+ }, 'role_locale');
79
79
  }
80
80
  async updateRoles(routeId, data) {
81
- await this.prismaService.role_routes.deleteMany({
81
+ await this.prismaService.role_route.deleteMany({
82
82
  where: {
83
83
  route_id: routeId,
84
84
  },
85
85
  });
86
- return this.prismaService.role_routes.createMany({
86
+ return this.prismaService.role_route.createMany({
87
87
  data: data.ids.map((roleId) => ({
88
88
  role_id: roleId,
89
89
  route_id: routeId,
@@ -92,11 +92,11 @@ let RouteService = class RouteService {
92
92
  });
93
93
  }
94
94
  async listScreens(locale, routeId, paginationParams) {
95
- return this.paginationService.paginate(this.prismaService.screens, paginationParams, {
95
+ return this.paginationService.paginate(this.prismaService.screen, paginationParams, {
96
96
  include: {
97
- screen_translations: {
97
+ screen_locale: {
98
98
  where: {
99
- locales: {
99
+ locale: {
100
100
  code: locale,
101
101
  },
102
102
  },
@@ -114,15 +114,15 @@ let RouteService = class RouteService {
114
114
  },
115
115
  },
116
116
  },
117
- }, 'screen_translations');
117
+ }, 'screen_locale');
118
118
  }
119
119
  async updateScreens(routeId, data) {
120
- await this.prismaService.route_screens.deleteMany({
120
+ await this.prismaService.route_screen.deleteMany({
121
121
  where: {
122
122
  route_id: routeId,
123
123
  },
124
124
  });
125
- return this.prismaService.route_screens.createMany({
125
+ return this.prismaService.route_screen.createMany({
126
126
  data: data.ids.map((screenId) => ({
127
127
  screen_id: screenId,
128
128
  route_id: routeId,
@@ -1 +1 @@
1
- {"version":3,"file":"route.service.js","sourceRoot":"","sources":["../../src/route/route.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAsE;AACtE,2CAA+C;AAC/C,2CAAgE;AAOzD,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,YAEmB,aAA4B,EAE5B,iBAAoC;QAFpC,kBAAa,GAAb,aAAa,CAAe;QAE5B,sBAAiB,GAAjB,iBAAiB,CAAmB;IACpD,CAAC;IAEJ,KAAK,CAAC,SAAS,CAAC,gBAA+B;QAC7C,MAAM,MAAM,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAEjC,MAAM,EAAE,GAAU,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAC1D,MAAM,EACN,gBAAgB,C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AAC,aAAa,CAAC,OAAe,EAAE,IAAkB;QACrD,MAAM,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,UAAU,CAAC;YAC/C,KAAK,EAAE;gBACL,QAAQ,EAAE,OAAO;aAClB;SACF,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,UAAU,CAAC;YAChD,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;gBAChC,SAAS,EAAE,QAAQ;gBACnB,QAAQ,EAAE,OAAO;aAClB,CAAC,CAAC;YACH,cAAc,EAAE,IAAI;SACrB,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA1JY,oCAAY;uBAAZ,YAAY;IADxB,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,YAAY,CA0JxB"}
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const testing_1 = require("@nestjs/testing");
4
3
  const pagination_1 = require("@hedhog/pagination");
5
4
  const prisma_1 = require("@hedhog/prisma");
5
+ const testing_1 = require("@nestjs/testing");
6
6
  const route_service_1 = require("./route.service");
7
7
  describe('RouteService', () => {
8
8
  let service;
9
9
  let prismaService;
10
10
  let paginationService;
11
11
  const mockPrismaService = {
12
- routes: {
12
+ route: {
13
13
  findUnique: jest.fn(),
14
14
  create: jest.fn(),
15
15
  update: jest.fn(),
16
16
  deleteMany: jest.fn(),
17
17
  },
18
- role_routes: {
18
+ role_route: {
19
19
  deleteMany: jest.fn(),
20
20
  createMany: jest.fn(),
21
21
  },
@@ -44,7 +44,7 @@ describe('RouteService', () => {
44
44
  expect(service).toBeDefined();
45
45
  });
46
46
  describe('getRoutes', () => {
47
- it('should paginate routes', async () => {
47
+ it('should paginate route', async () => {
48
48
  const paginationParams = {
49
49
  page: 1,
50
50
  pageSize: 10,
@@ -58,7 +58,7 @@ describe('RouteService', () => {
58
58
  mockPaginationService.paginate.mockResolvedValue(result);
59
59
  const res = await service.getRoutes(paginationParams);
60
60
  expect(mockPrismaService.createInsensitiveSearch).toHaveBeenCalledWith(['url', 'method'], paginationParams);
61
- expect(mockPaginationService.paginate).toHaveBeenCalledWith(mockPrismaService.routes, paginationParams, { where: { OR: [] } });
61
+ expect(mockPaginationService.paginate).toHaveBeenCalledWith(mockPrismaService.route, paginationParams, { where: { OR: [] } });
62
62
  expect(res).toEqual(result);
63
63
  });
64
64
  });
@@ -66,9 +66,9 @@ describe('RouteService', () => {
66
66
  it('should return a route by ID', async () => {
67
67
  const routeId = 1;
68
68
  const route = { id: routeId, url: '/test', method: 'GET' };
69
- mockPrismaService.routes.findUnique.mockResolvedValue(route);
69
+ mockPrismaService.route.findUnique.mockResolvedValue(route);
70
70
  const res = await service.getRouteById(routeId);
71
- expect(mockPrismaService.routes.findUnique).toHaveBeenCalledWith({
71
+ expect(mockPrismaService.route.findUnique).toHaveBeenCalledWith({
72
72
  where: { id: routeId },
73
73
  });
74
74
  expect(res).toEqual(route);
@@ -78,9 +78,9 @@ describe('RouteService', () => {
78
78
  it('should create a new route', async () => {
79
79
  const createDto = { url: '/test', method: 'GET' };
80
80
  const route = Object.assign({ id: 1 }, createDto);
81
- mockPrismaService.routes.create.mockResolvedValue(route);
81
+ mockPrismaService.route.create.mockResolvedValue(route);
82
82
  const res = await service.create(createDto);
83
- expect(mockPrismaService.routes.create).toHaveBeenCalledWith({
83
+ expect(mockPrismaService.route.create).toHaveBeenCalledWith({
84
84
  data: createDto,
85
85
  });
86
86
  expect(res).toEqual(route);
@@ -91,9 +91,9 @@ describe('RouteService', () => {
91
91
  const updateDto = { url: '/updated', method: 'POST' };
92
92
  const routeId = 1;
93
93
  const updatedRoute = Object.assign({ id: routeId }, updateDto);
94
- mockPrismaService.routes.update.mockResolvedValue(updatedRoute);
94
+ mockPrismaService.route.update.mockResolvedValue(updatedRoute);
95
95
  const res = await service.update({ id: routeId, data: updateDto });
96
- expect(mockPrismaService.routes.update).toHaveBeenCalledWith({
96
+ expect(mockPrismaService.route.update).toHaveBeenCalledWith({
97
97
  where: { id: routeId },
98
98
  data: updateDto,
99
99
  });
@@ -101,29 +101,29 @@ describe('RouteService', () => {
101
101
  });
102
102
  });
103
103
  describe('delete', () => {
104
- it('should delete routes by ids', async () => {
104
+ it('should delete route by ids', async () => {
105
105
  const deleteDto = { ids: [1, 2] };
106
106
  const result = { count: 2 };
107
- mockPrismaService.routes.deleteMany.mockResolvedValue(result);
107
+ mockPrismaService.route.deleteMany.mockResolvedValue(result);
108
108
  const res = await service.delete(deleteDto);
109
- expect(mockPrismaService.routes.deleteMany).toHaveBeenCalledWith({
109
+ expect(mockPrismaService.route.deleteMany).toHaveBeenCalledWith({
110
110
  where: { id: { in: deleteDto.ids } },
111
111
  });
112
112
  expect(res).toEqual(result);
113
113
  });
114
114
  });
115
115
  describe('updateRoles', () => {
116
- it('should update roles for a route', async () => {
116
+ it('should update role for a route', async () => {
117
117
  const routeId = 1;
118
118
  const updateIdsDto = { ids: [1, 2] };
119
119
  const result = { count: 2 };
120
- mockPrismaService.role_routes.deleteMany.mockResolvedValue({});
121
- mockPrismaService.role_routes.createMany.mockResolvedValue(result);
120
+ mockPrismaService.role_route.deleteMany.mockResolvedValue({});
121
+ mockPrismaService.role_route.createMany.mockResolvedValue(result);
122
122
  const res = await service.updateRoles(routeId, updateIdsDto);
123
- expect(mockPrismaService.role_routes.deleteMany).toHaveBeenCalledWith({
123
+ expect(mockPrismaService.role_route.deleteMany).toHaveBeenCalledWith({
124
124
  where: { route_id: routeId },
125
125
  });
126
- expect(mockPrismaService.role_routes.createMany).toHaveBeenCalledWith({
126
+ expect(mockPrismaService.role_route.createMany).toHaveBeenCalledWith({
127
127
  data: updateIdsDto.ids.map((roleId) => ({
128
128
  role_id: roleId,
129
129
  route_id: routeId,
@@ -171,18 +171,18 @@ describe('RouteService', () => {
171
171
  total: 0,
172
172
  });
173
173
  await service.listRoles(locale, routeId, paginationParams);
174
- expect(paginationService.paginate).toHaveBeenCalledWith(prismaService.roles, paginationParams, {
174
+ expect(paginationService.paginate).toHaveBeenCalledWith(prismaService.role, paginationParams, {
175
175
  include: {
176
- role_translations: {
176
+ role_locale: {
177
177
  where: {
178
- locales: { code: locale },
178
+ locale: { code: locale },
179
179
  },
180
180
  select: {
181
181
  name: true,
182
182
  description: true,
183
183
  },
184
184
  },
185
- role_routes: {
185
+ role_route: {
186
186
  where: { route_id: routeId },
187
187
  select: {
188
188
  route_id: true,
@@ -190,7 +190,7 @@ describe('RouteService', () => {
190
190
  },
191
191
  },
192
192
  },
193
- }, 'role_translations');
193
+ }, 'role_locale');
194
194
  });
195
195
  });
196
196
  describe('listScreens', () => {
@@ -212,9 +212,9 @@ describe('RouteService', () => {
212
212
  await service.listScreens(locale, routeId, paginationParams);
213
213
  expect(paginationService.paginate).toHaveBeenCalledWith(prismaService.screens, paginationParams, {
214
214
  include: {
215
- screen_translations: {
215
+ screen_locale: {
216
216
  where: {
217
- locales: { code: locale },
217
+ locale: { code: locale },
218
218
  },
219
219
  select: {
220
220
  name: true,
@@ -228,7 +228,7 @@ describe('RouteService', () => {
228
228
  },
229
229
  },
230
230
  },
231
- }, 'screen_translations');
231
+ }, 'screen_locale');
232
232
  });
233
233
  });
234
234
  });
@@ -1 +1 @@
1
- {"version":3,"file":"route.service.spec.js","sourceRoot":"","sources":["../../src/route/route.service.spec.ts"],"names":[],"mappings":";;AAAA,6CAAsD;AACtD,mDAI4B;AAC5B,2CAA+C;AAC/C,mDAA+C;AAM/C,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,IAAI,OAAqB,CAAC;IAC1B,IAAI,a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QAAQ,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC;gBACvD,IAAI,EAAE,EAAE;gBACR,KAAK,EAAE,CAAC;aACT,CAAC,CAAC;YAEH,MAAM,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC;YAE7D,MAAM,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,oBAAoB,CACrD,aAAa,CAAC,OAAO,EACrB,gBAAgB,EAChB;gBACE,OAAO,EAAE;oBACP,mBAAmB,EAAE;wBACnB,KAAK,EAAE;4BACL,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;yBAC1B;wBACD,MAAM,EAAE;4BACN,IAAI,EAAE,IAAI;yBACX;qBACF;oBACD,aAAa,EAAE;wBACb,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE;wBAC5B,MAAM,EAAE;4BACN,QAAQ,EAAE,IAAI;4BACd,SAAS,EAAE,IAAI;yBAChB;qBACF;iBACF;aACF,EACD,qBAAqB,CACtB,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"route.service.spec.js","sourceRoot":"","sources":["../../src/route/route.service.spec.ts"],"names":[],"mappings":";;AAAA,mDAI4B;AAC5B,2CAA+C;AAC/C,6CAAsD;AAKtD,mDAA+C;AAE/C,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,IAAI,OAAqB,CAAC;IAC1B,IAAI,aAA4B,CAAC;IACjC,IAAI,iBAAoC,CAAC;IAEzC,MAAM,iBAAiB,GAAG;QACxB,KAAK,EAAE;YACL,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;YACrB,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE;YACjB,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE;YACjB,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;SACtB;QACD,UAAU,E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AC,OAAO,EACrB,gBAAgB,EAChB;gBACE,OAAO,EAAE;oBACP,aAAa,EAAE;wBACb,KAAK,EAAE;4BACL,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;yBACzB;wBACD,MAAM,EAAE;4BACN,IAAI,EAAE,IAAI;yBACX;qBACF;oBACD,aAAa,EAAE;wBACb,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE;wBAC5B,MAAM,EAAE;4BACN,QAAQ,EAAE,IAAI;4BACd,SAAS,EAAE,IAAI;yBAChB;qBACF;iBACF;aACF,EACD,eAAe,CAChB,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -67,7 +67,7 @@ __decorate([
67
67
  __metadata("design:returntype", Promise)
68
68
  ], ScreenController.prototype, "getScreens", null);
69
69
  __decorate([
70
- (0, common_1.Get)(':screenId/roles'),
70
+ (0, common_1.Get)(':screenId/role'),
71
71
  __param(0, (0, common_1.Param)('screenId', common_1.ParseIntPipe)),
72
72
  __param(1, (0, pagination_1.Pagination)()),
73
73
  __param(2, (0, locale_1.Locale)()),
@@ -76,7 +76,7 @@ __decorate([
76
76
  __metadata("design:returntype", Promise)
77
77
  ], ScreenController.prototype, "listRoles", null);
78
78
  __decorate([
79
- (0, common_1.Get)(':screenId/routes'),
79
+ (0, common_1.Get)(':screenId/route'),
80
80
  __param(0, (0, common_1.Param)('screenId', common_1.ParseIntPipe)),
81
81
  __param(1, (0, pagination_1.Pagination)()),
82
82
  __metadata("design:type", Function),
@@ -84,7 +84,7 @@ __decorate([
84
84
  __metadata("design:returntype", Promise)
85
85
  ], ScreenController.prototype, "listRoutes", null);
86
86
  __decorate([
87
- (0, common_1.Patch)(':screenId/roles'),
87
+ (0, common_1.Patch)(':screenId/role'),
88
88
  __param(0, (0, common_1.Param)('screenId', common_1.ParseIntPipe)),
89
89
  __param(1, (0, common_1.Body)()),
90
90
  __metadata("design:type", Function),
@@ -92,7 +92,7 @@ __decorate([
92
92
  __metadata("design:returntype", Promise)
93
93
  ], ScreenController.prototype, "updateRoles", null);
94
94
  __decorate([
95
- (0, common_1.Patch)(':screenId/routes'),
95
+ (0, common_1.Patch)(':screenId/route'),
96
96
  __param(0, (0, common_1.Param)('screenId', common_1.ParseIntPipe)),
97
97
  __param(1, (0, common_1.Body)()),
98
98
  __metadata("design:type", Function),
@@ -1 +1 @@
1
- {"version":3,"file":"screen.controller.js","sourceRoot":"","sources":["../../src/screen/screen.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAWwB;AACxB,kDAA8C;AAC9C,0DAAqD;AACrD,sCAAmC;AACnC,sEAAyD;AACzD,iDAA6C;AAC7C,iDAA6C;AAC7C,qDAAiD;AAI1C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,YAEmB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAGE,AAAN,KAAK,CAAC,UAAU,CAAe,gBAAgB,EAAY,MAAM;QAC/D,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACjE,CAAC;IAGK,AAAN,KAAK,CAAC,SAAS,CACoB,QAAgB,EACnC,gBAAgB,EACpB,MAAM;QAEhB,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC;IAC1E,CAAC;IAGK,AAAN,KAAK,CAAC,UAAU,CACmB,QAAgB,EACnC,gBAAgB;QAE9B,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;IACnE,CAAC;IAGK,AAAN,KAAK,CAAC,WAAW,CACkB,QAAgB,EACzC,IAAkB;QAE1B,OAAO,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;IA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C/B,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,sBAAS;;8CAMxB;AAGK;IADL,IAAA,eAAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;8CAEnC;2BApEU,gBAAgB;IAF5B,IAAA,qBAAI,GAAE;IACN,IAAA,mBAAU,EAAC,SAAS,CAAC;IAGjB,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,8BAAa,CAAC,CAAC,CAAA;qCACR,8BAAa;GAHpC,gBAAgB,CAqE5B"}
@@ -1,9 +1,9 @@
1
1
  import { PaginationDTO, PaginationService } from '@hedhog/pagination';
2
2
  import { PrismaService } from '@hedhog/prisma';
3
- import { CreateDTO } from './dto/create.dto';
4
3
  import { DeleteDTO } from '../dto/delete.dto';
5
- import { UpdateDTO } from './dto/update.dto';
6
4
  import { UpdateIdsDTO } from '../dto/update-ids.dto';
5
+ import { CreateDTO } from './dto/create.dto';
6
+ import { UpdateDTO } from './dto/update.dto';
7
7
  export declare class ScreenService {
8
8
  private readonly prismaService;
9
9
  private readonly paginationService;
@@ -1 +1 @@
1
- {"version":3,"file":"screen.service.d.ts","sourceRoot":"","sources":["../../src/screen/screen.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,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBACa,aAAa;IAGtB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa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AE,iBAAiB;IAGjD,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;IAehD,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,YAAY;IA4BpD,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa;IAoB5D,SAAS,CACb,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,aAAa;IAqB3B,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa;IAkC1D,GAAG,CAAC,QAAQ,EAAE,MAAM;IAIpB,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,SAAS;IAWnD,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"}
@@ -22,12 +22,12 @@ let ScreenService = class ScreenService {
22
22
  this.paginationService = paginationService;
23
23
  }
24
24
  async updateRoles(screenId, data) {
25
- await this.prismaService.role_screens.deleteMany({
25
+ await this.prismaService.role_screen.deleteMany({
26
26
  where: {
27
27
  screen_id: screenId,
28
28
  },
29
29
  });
30
- return this.prismaService.role_screens.createMany({
30
+ return this.prismaService.role_screen.createMany({
31
31
  data: data.ids.map((roleId) => ({
32
32
  screen_id: screenId,
33
33
  role_id: roleId,
@@ -36,7 +36,7 @@ let ScreenService = class ScreenService {
36
36
  });
37
37
  }
38
38
  async updateRoutes(screenId, { ids }) {
39
- ids = (await this.prismaService.routes.findMany({
39
+ ids = (await this.prismaService.route.findMany({
40
40
  where: {
41
41
  id: {
42
42
  in: ids,
@@ -46,12 +46,12 @@ let ScreenService = class ScreenService {
46
46
  id: true,
47
47
  },
48
48
  })).map((route) => route.id);
49
- await this.prismaService.route_screens.deleteMany({
49
+ await this.prismaService.route_screen.deleteMany({
50
50
  where: {
51
51
  screen_id: screenId,
52
52
  },
53
53
  });
54
- return this.prismaService.route_screens.createMany({
54
+ return this.prismaService.route_screen.createMany({
55
55
  data: ids.map((routeId) => ({
56
56
  screen_id: screenId,
57
57
  route_id: routeId,
@@ -60,7 +60,7 @@ let ScreenService = class ScreenService {
60
60
  });
61
61
  }
62
62
  async listRoutes(screenId, paginationParams) {
63
- return this.paginationService.paginate(this.prismaService.routes, paginationParams, {
63
+ return this.paginationService.paginate(this.prismaService.route, paginationParams, {
64
64
  include: {
65
65
  route_screens: {
66
66
  where: {
@@ -75,9 +75,9 @@ let ScreenService = class ScreenService {
75
75
  });
76
76
  }
77
77
  async listRoles(locale, screenId, paginationParams) {
78
- return this.paginationService.paginate(this.prismaService.roles, paginationParams, {
78
+ return this.paginationService.paginate(this.prismaService.role, paginationParams, {
79
79
  include: {
80
- role_screens: {
80
+ role_screen: {
81
81
  where: {
82
82
  screen_id: screenId,
83
83
  },
@@ -92,14 +92,14 @@ let ScreenService = class ScreenService {
92
92
  async getScreens(locale, paginationParams) {
93
93
  const fields = ['slug', 'icon'];
94
94
  const OR = this.prismaService.createInsensitiveSearch(fields, paginationParams);
95
- const result = await this.paginationService.paginate(this.prismaService.screens, paginationParams, {
95
+ const result = await this.paginationService.paginate(this.prismaService.screen, paginationParams, {
96
96
  where: {
97
97
  OR,
98
98
  },
99
99
  include: {
100
- screen_translations: {
100
+ screen_locale: {
101
101
  where: {
102
- locales: {
102
+ locale: {
103
103
  code: locale,
104
104
  },
105
105
  },
@@ -109,14 +109,14 @@ let ScreenService = class ScreenService {
109
109
  },
110
110
  },
111
111
  },
112
- }, 'screen_translations');
112
+ }, 'screen_locale');
113
113
  return result;
114
114
  }
115
115
  async get(screenId) {
116
- return this.prismaService.screens.findUnique({ where: { id: screenId } });
116
+ return this.prismaService.screen.findUnique({ where: { id: screenId } });
117
117
  }
118
118
  async create({ name, slug, description, icon }) {
119
- return this.prismaService.screens.create({
119
+ return this.prismaService.screen.create({
120
120
  data: {
121
121
  name,
122
122
  slug,
@@ -126,7 +126,7 @@ let ScreenService = class ScreenService {
126
126
  });
127
127
  }
128
128
  async update({ id, data }) {
129
- return this.prismaService.screens.update({
129
+ return this.prismaService.screen.update({
130
130
  where: { id },
131
131
  data,
132
132
  });
@@ -135,7 +135,7 @@ let ScreenService = class ScreenService {
135
135
  if (ids == undefined || ids == null) {
136
136
  throw new common_1.BadRequestException(`You must select at least one screen to delete.`);
137
137
  }
138
- return this.prismaService.screens.deleteMany({
138
+ return this.prismaService.screen.deleteMany({
139
139
  where: {
140
140
  id: {
141
141
  in: ids,