@hedhog/admin 0.0.104 → 0.0.106
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +141 -141
- package/dist/admin.module.d.ts.map +1 -1
- package/dist/admin.module.js +8 -7
- package/dist/admin.module.js.map +1 -1
- package/dist/auth/auth.service.d.ts +1 -1
- package/dist/auth/auth.service.d.ts.map +1 -1
- package/dist/auth/auth.service.js +8 -8
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/auth/auth.service.spec.js +16 -16
- package/dist/auth/auth.service.spec.js.map +1 -1
- package/dist/dto/with-locale.dto.d.ts +4 -0
- package/dist/dto/with-locale.dto.d.ts.map +1 -0
- package/dist/dto/{with-locales.dto.js → with-locale.dto.js} +5 -5
- package/dist/dto/with-locale.dto.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/locale/locale.controller.d.ts +1 -1
- package/dist/locale/locale.controller.d.ts.map +1 -1
- package/dist/locale/locale.controller.js +4 -4
- package/dist/locale/locale.controller.js.map +1 -1
- package/dist/locale/locale.middleware.d.ts +1 -1
- package/dist/locale/locale.middleware.d.ts.map +1 -1
- package/dist/locale/locale.middleware.js +2 -2
- package/dist/locale/locale.middleware.js.map +1 -1
- package/dist/locale/locale.service.d.ts +6 -6
- package/dist/locale/locale.service.d.ts.map +1 -1
- package/dist/locale/locale.service.js +43 -43
- package/dist/locale/locale.service.js.map +1 -1
- package/dist/locale/locale.service.spec.js +14 -14
- package/dist/locale/locale.service.spec.js.map +1 -1
- package/dist/menu/menu.controller.js +3 -3
- package/dist/menu/menu.controller.js.map +1 -1
- package/dist/menu/menu.service.d.ts +3 -3
- package/dist/menu/menu.service.d.ts.map +1 -1
- package/dist/menu/menu.service.js +35 -35
- package/dist/menu/menu.service.js.map +1 -1
- package/dist/menu/menu.service.spec.js +33 -37
- package/dist/menu/menu.service.spec.js.map +1 -1
- package/dist/role/dto/create.dto.d.ts +2 -2
- package/dist/role/dto/create.dto.d.ts.map +1 -1
- package/dist/role/dto/create.dto.js +2 -2
- package/dist/role/dto/create.dto.js.map +1 -1
- package/dist/role/guards/role.guard.js +4 -4
- package/dist/role/guards/role.guard.js.map +1 -1
- package/dist/role/role.controller.d.ts.map +1 -1
- package/dist/role/role.controller.js +9 -9
- package/dist/role/role.controller.js.map +1 -1
- package/dist/role/role.service.d.ts +2 -2
- package/dist/role/role.service.d.ts.map +1 -1
- package/dist/role/role.service.js +35 -35
- package/dist/role/role.service.js.map +1 -1
- package/dist/role/role.service.spec.d.ts +0 -1
- package/dist/role/role.service.spec.js +400 -340
- package/dist/role/role.service.spec.js.map +1 -1
- package/dist/route/route.controller.js +3 -3
- package/dist/route/route.controller.js.map +1 -1
- package/dist/route/route.service.d.ts +2 -2
- package/dist/route/route.service.d.ts.map +1 -1
- package/dist/route/route.service.js +19 -19
- package/dist/route/route.service.js.map +1 -1
- package/dist/route/route.service.spec.js +27 -27
- package/dist/route/route.service.spec.js.map +1 -1
- package/dist/screen/screen.controller.d.ts +1 -1
- package/dist/screen/screen.controller.d.ts.map +1 -1
- package/dist/screen/screen.controller.js +8 -8
- package/dist/screen/screen.controller.js.map +1 -1
- package/dist/screen/screen.service.d.ts +3 -3
- package/dist/screen/screen.service.d.ts.map +1 -1
- package/dist/screen/screen.service.js +18 -18
- package/dist/screen/screen.service.js.map +1 -1
- package/dist/screen/screen.service.spec.js +16 -16
- package/dist/screen/screen.service.spec.js.map +1 -1
- package/dist/setting/dto/setting.dto.d.ts +9 -0
- package/dist/setting/dto/setting.dto.d.ts.map +1 -0
- package/dist/setting/dto/{settings.dto.js → setting.dto.js} +6 -6
- package/dist/setting/dto/setting.dto.js.map +1 -0
- package/dist/setting/{settings.controller.d.ts → setting.controller.d.ts} +8 -8
- package/dist/setting/setting.controller.d.ts.map +1 -0
- package/dist/setting/{settings.controller.js → setting.controller.js} +26 -26
- package/dist/setting/setting.controller.js.map +1 -0
- package/dist/setting/setting.module.d.ts +3 -0
- package/dist/setting/setting.module.d.ts.map +1 -0
- package/dist/setting/{settings.module.js → setting.module.js} +6 -6
- package/dist/setting/setting.module.js.map +1 -0
- package/dist/setting/{settings.service.d.ts → setting.service.d.ts} +6 -6
- package/dist/setting/setting.service.d.ts.map +1 -0
- package/dist/setting/{settings.service.js → setting.service.js} +44 -44
- package/dist/setting/setting.service.js.map +1 -0
- package/dist/setting/setting.service.spec.d.ts +2 -0
- package/dist/setting/setting.service.spec.d.ts.map +1 -0
- package/dist/setting/{settings.service.spec.js → setting.service.spec.js} +17 -17
- package/dist/setting/setting.service.spec.js.map +1 -0
- package/dist/user/user.controller.d.ts +2 -2
- package/dist/user/user.controller.d.ts.map +1 -1
- package/dist/user/user.controller.js +8 -8
- package/dist/user/user.controller.js.map +1 -1
- package/dist/user/user.service.d.ts +3 -3
- package/dist/user/user.service.d.ts.map +1 -1
- package/dist/user/user.service.js +10 -10
- package/dist/user/user.service.js.map +1 -1
- package/dist/user/user.service.spec.js +62 -49
- package/dist/user/user.service.spec.js.map +1 -1
- package/package.json +2 -2
- package/src/admin.module.ts +37 -0
- package/src/auth/auth.controller.ts +48 -0
- package/src/auth/auth.module.ts +39 -0
- package/src/auth/auth.service.spec.ts +196 -0
- package/src/auth/auth.service.ts +175 -0
- package/src/auth/decorators/public.decorator.ts +4 -0
- package/src/auth/decorators/user.decorator.ts +17 -0
- package/src/auth/dto/forget.dto.ts +6 -0
- package/src/auth/dto/login.dto.ts +15 -0
- package/src/auth/dto/otp.dto.ts +11 -0
- package/src/auth/enums/multifactor-type.enum.ts +4 -0
- package/src/auth/guards/auth.guard.ts +50 -0
- package/src/auth/types/user.type.ts +8 -0
- package/src/dto/delete.dto.ts +8 -0
- package/src/dto/update-ids.dto.ts +9 -0
- package/src/dto/with-locale.dto.ts +8 -0
- package/src/index.ts +34 -0
- package/src/locale/dto/create.dto.ts +12 -0
- package/src/locale/dto/delete.dto.ts +8 -0
- package/src/locale/dto/set-enabled.dto.ts +9 -0
- package/src/locale/dto/update.dto.ts +15 -0
- package/src/locale/index.ts +4 -0
- package/src/locale/locale.controller.ts +79 -0
- package/src/locale/locale.decorator.ts +8 -0
- package/src/locale/locale.middleware.ts +34 -0
- package/src/locale/locale.module.ts +23 -0
- package/src/locale/locale.service.spec.ts +193 -0
- package/src/locale/locale.service.ts +366 -0
- package/src/menu/dto/create.dto.ts +25 -0
- package/src/menu/dto/order.dto.ts +8 -0
- package/src/menu/dto/update.dto.ts +19 -0
- package/src/menu/menu.controller.ts +106 -0
- package/src/menu/menu.module.ts +18 -0
- package/src/menu/menu.service.spec.ts +247 -0
- package/src/menu/menu.service.ts +263 -0
- package/src/role/decorators/role.decorator.ts +4 -0
- package/src/role/dto/create.dto.ts +7 -0
- package/src/role/dto/update.dto.ts +4 -0
- package/src/role/guards/role.guard.ts +122 -0
- package/src/role/role.controller.ts +126 -0
- package/src/role/role.module.ts +28 -0
- package/src/role/role.service.spec.ts +417 -0
- package/src/role/role.service.ts +302 -0
- package/src/route/dto/create.dto.ts +13 -0
- package/src/route/dto/update.dto.ts +15 -0
- package/src/route/route.controller.ts +91 -0
- package/src/route/route.module.ts +18 -0
- package/src/route/route.service.spec.ts +299 -0
- package/src/route/route.service.ts +164 -0
- package/src/screen/dto/create.dto.ts +19 -0
- package/src/screen/dto/update.dto.ts +19 -0
- package/src/screen/screen.controller.ts +93 -0
- package/src/screen/screen.module.ts +18 -0
- package/src/screen/screen.service.spec.ts +298 -0
- package/src/screen/screen.service.ts +181 -0
- package/src/setting/dto/create.dto.ts +1 -0
- package/src/setting/dto/setting-user.dto.ts +6 -0
- package/src/setting/dto/setting.dto.ts +17 -0
- package/src/setting/dto/update.dto.ts +3 -0
- package/src/setting/setting.controller.ts +100 -0
- package/src/setting/setting.module.ts +18 -0
- package/src/setting/setting.service.spec.ts +183 -0
- package/src/setting/setting.service.ts +346 -0
- package/src/types/http-method.ts +8 -0
- package/src/user/constants/user.constants.ts +1 -0
- package/src/user/dto/create.dto.ts +24 -0
- package/src/user/dto/update.dto.ts +41 -0
- package/src/user/user.controller.ts +75 -0
- package/src/user/user.module.ts +18 -0
- package/src/user/user.service.spec.ts +294 -0
- package/src/user/user.service.ts +129 -0
- package/tsconfig.lib.json +9 -0
- package/tsconfig.production.json +20 -0
- package/dist/dto/with-locales.dto.d.ts +0 -4
- package/dist/dto/with-locales.dto.d.ts.map +0 -1
- package/dist/dto/with-locales.dto.js.map +0 -1
- package/dist/setting/dto/settings.dto.d.ts +0 -9
- package/dist/setting/dto/settings.dto.d.ts.map +0 -1
- package/dist/setting/dto/settings.dto.js.map +0 -1
- package/dist/setting/settings.controller.d.ts.map +0 -1
- package/dist/setting/settings.controller.js.map +0 -1
- package/dist/setting/settings.module.d.ts +0 -3
- package/dist/setting/settings.module.d.ts.map +0 -1
- package/dist/setting/settings.module.js.map +0 -1
- package/dist/setting/settings.service.d.ts.map +0 -1
- package/dist/setting/settings.service.js.map +0 -1
- package/dist/setting/settings.service.spec.d.ts +0 -2
- package/dist/setting/settings.service.spec.d.ts.map +0 -1
- 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,MAAM,cAAI,CAAC,mBAAmB,CAAC;YAC3D,SAAS,EAAE;gBACT,0BAAW;gBACX;oBACE,OAAO,EAAE,sBAAa;oBACtB,QAAQ,EAAE;wBACR,KAAK,EAAE;4BACL,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE;4BACjB,MAAM,EAAE,IAAI,CAAC,EAA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B,CAAC,MAAM,CAAC,CAAC;YAExE,MAAM,CAAC,MAAM,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
1
|
+
{"version":3,"file":"role.service.spec.js","sourceRoot":"","sources":["../../src/role/role.service.spec.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsEE;AACF,6BAA6B;AAC7B,uDAAuD;AACvD,+BAA+B;AAC/B,uBAAuB;AACvB,4CAA4C;AAC5C,SAAS;AACT,uBAAuB;AACvB,eAAe;AACf,gBAAgB;AAChB,gCAAgC;AAChC,gCAAgC;AAChC,SAAS;AAET,0EAA0E;AAE1E,8EAA8E;AAC9E,QAAQ;AACR,MAAM;AACN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuUE"}
|
@@ -92,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/
|
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/
|
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)('
|
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,CAAC;IACvD,CAAC;IAGK,AAAN,KAAK,CAAC,YAAY,CAAiC,OAAe;QAChE,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY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 -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,
|
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,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,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;IAgC3B,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;CAexD"}
|
@@ -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.
|
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.
|
34
|
+
return this.prismaService.route.findUnique({ where: { id: routeId } });
|
35
35
|
}
|
36
36
|
async create({ url, method }) {
|
37
|
-
return this.prismaService.
|
37
|
+
return this.prismaService.route.create({ data: { url, method } });
|
38
38
|
}
|
39
39
|
async update({ id, data }) {
|
40
|
-
return this.prismaService.
|
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.
|
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.
|
55
|
+
return this.paginationService.paginate(this.prismaService.role, paginationParams, {
|
56
56
|
include: {
|
57
|
-
|
57
|
+
role_locale: {
|
58
58
|
where: {
|
59
|
-
|
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
|
-
|
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
|
-
}, '
|
78
|
+
}, 'role_locale');
|
79
79
|
}
|
80
80
|
async updateRoles(routeId, data) {
|
81
|
-
await this.prismaService.
|
81
|
+
await this.prismaService.role_route.deleteMany({
|
82
82
|
where: {
|
83
83
|
route_id: routeId,
|
84
84
|
},
|
85
85
|
});
|
86
|
-
return this.prismaService.
|
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.
|
95
|
+
return this.paginationService.paginate(this.prismaService.screen, paginationParams, {
|
96
96
|
include: {
|
97
|
-
|
97
|
+
screen_locale: {
|
98
98
|
where: {
|
99
|
-
|
99
|
+
locale: {
|
100
100
|
code: locale,
|
101
101
|
},
|
102
102
|
},
|
@@ -104,7 +104,7 @@ let RouteService = class RouteService {
|
|
104
104
|
name: true,
|
105
105
|
},
|
106
106
|
},
|
107
|
-
|
107
|
+
route_screen: {
|
108
108
|
where: {
|
109
109
|
route_id: routeId,
|
110
110
|
},
|
@@ -114,15 +114,15 @@ let RouteService = class RouteService {
|
|
114
114
|
},
|
115
115
|
},
|
116
116
|
},
|
117
|
-
}, '
|
117
|
+
}, 'screen_locale');
|
118
118
|
}
|
119
119
|
async updateScreens(routeId, data) {
|
120
|
-
await this.prismaService.
|
120
|
+
await this.prismaService.route_screen.deleteMany({
|
121
121
|
where: {
|
122
122
|
route_id: routeId,
|
123
123
|
},
|
124
124
|
});
|
125
|
-
return this.prismaService.
|
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,CACjB,CAAC;QAEF,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CACpC,IAAI,CAAC,aAAa,CAAC,
|
1
|
+
{"version":3,"file":"route.service.js","sourceRoot":"","sources":["../../src/route/route.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAsE;AACtE,2CAA+C;AAC/C,2CAAgE;A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AAa,EAAE;oBACb,KAAK,EAAE;wBACL,MAAM,EAAE;4BACN,IAAI,EAAE,MAAM;yBACb;qBACF;oBACD,MAAM,EAAE;wBACN,IAAI,EAAE,IAAI;qBACX;iBACF;gBACD,YAAY,EAAE;oBACZ,KAAK,EAAE;wBACL,QAAQ,EAAE,OAAO;qBAClB;oBACD,MAAM,EAAE;wBACN,QAAQ,EAAE,IAAI;wBACd,SAAS,EAAE,IAAI;qBAChB;iBACF;aACF;SACF,EACD,eAAe,CAChB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,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
|
-
|
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
|
-
|
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
|
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.
|
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.
|
69
|
+
mockPrismaService.route.findUnique.mockResolvedValue(route);
|
70
70
|
const res = await service.getRouteById(routeId);
|
71
|
-
expect(mockPrismaService.
|
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.
|
81
|
+
mockPrismaService.route.create.mockResolvedValue(route);
|
82
82
|
const res = await service.create(createDto);
|
83
|
-
expect(mockPrismaService.
|
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.
|
94
|
+
mockPrismaService.route.update.mockResolvedValue(updatedRoute);
|
95
95
|
const res = await service.update({ id: routeId, data: updateDto });
|
96
|
-
expect(mockPrismaService.
|
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
|
104
|
+
it('should delete route by ids', async () => {
|
105
105
|
const deleteDto = { ids: [1, 2] };
|
106
106
|
const result = { count: 2 };
|
107
|
-
mockPrismaService.
|
107
|
+
mockPrismaService.route.deleteMany.mockResolvedValue(result);
|
108
108
|
const res = await service.delete(deleteDto);
|
109
|
-
expect(mockPrismaService.
|
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
|
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.
|
121
|
-
mockPrismaService.
|
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.
|
123
|
+
expect(mockPrismaService.role_route.deleteMany).toHaveBeenCalledWith({
|
124
124
|
where: { route_id: routeId },
|
125
125
|
});
|
126
|
-
expect(mockPrismaService.
|
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.
|
174
|
+
expect(paginationService.paginate).toHaveBeenCalledWith(prismaService.role, paginationParams, {
|
175
175
|
include: {
|
176
|
-
|
176
|
+
role_locale: {
|
177
177
|
where: {
|
178
|
-
|
178
|
+
locale: { code: locale },
|
179
179
|
},
|
180
180
|
select: {
|
181
181
|
name: true,
|
182
182
|
description: true,
|
183
183
|
},
|
184
184
|
},
|
185
|
-
|
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
|
-
}, '
|
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
|
-
|
215
|
+
screen_locale: {
|
216
216
|
where: {
|
217
|
-
|
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
|
-
}, '
|
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,
|
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,EAAE;YACV,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;YACrB,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;SACtB;QACD,aAAa,EAAE;YACb,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;YACrB,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;SACtB;QACD,uBAAuB,EAAE,IAAI,CAAC,E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AE,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"}
|
@@ -6,7 +6,7 @@ import { ScreenService } from './screen.service';
|
|
6
6
|
export declare class ScreenController {
|
7
7
|
private readonly screenService;
|
8
8
|
constructor(screenService: ScreenService);
|
9
|
-
|
9
|
+
list(paginationParams: any, locale: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
10
10
|
listRoles(screenId: number, paginationParams: any, locale: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
11
11
|
listRoutes(screenId: number, paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
12
12
|
updateRoles(screenId: number, data: UpdateIdsDTO): Promise<any>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"screen.controller.d.ts","sourceRoot":"","sources":["../../src/screen/screen.controller.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGrD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,qBAEa,gBAAgB;IAGzB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAIzC,
|
1
|
+
{"version":3,"file":"screen.controller.d.ts","sourceRoot":"","sources":["../../src/screen/screen.controller.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGrD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,qBAEa,gBAAgB;IAGzB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAIzC,IAAI,CAAe,gBAAgB,KAAA,EAAY,MAAM,KAAA;IAKrD,SAAS,CACoB,QAAQ,EAAE,MAAM,EACnC,gBAAgB,KAAA,EACpB,MAAM,KAAA;IAMZ,UAAU,CACmB,QAAQ,EAAE,MAAM,EACnC,gBAAgB,KAAA;IAM1B,WAAW,CACkB,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,YAAY;IAMtB,YAAY,CACiB,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,YAAY;IAMtB,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"}
|
@@ -26,8 +26,8 @@ let ScreenController = class ScreenController {
|
|
26
26
|
constructor(screenService) {
|
27
27
|
this.screenService = screenService;
|
28
28
|
}
|
29
|
-
async
|
30
|
-
return this.screenService.
|
29
|
+
async list(paginationParams, locale) {
|
30
|
+
return this.screenService.list(locale, paginationParams);
|
31
31
|
}
|
32
32
|
async listRoles(screenId, paginationParams, locale) {
|
33
33
|
return this.screenService.listRoles(locale, screenId, paginationParams);
|
@@ -65,9 +65,9 @@ __decorate([
|
|
65
65
|
__metadata("design:type", Function),
|
66
66
|
__metadata("design:paramtypes", [Object, Object]),
|
67
67
|
__metadata("design:returntype", Promise)
|
68
|
-
], ScreenController.prototype, "
|
68
|
+
], ScreenController.prototype, "list", null);
|
69
69
|
__decorate([
|
70
|
-
(0, common_1.Get)(':screenId/
|
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/
|
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/
|
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/
|
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),
|
@@ -130,7 +130,7 @@ __decorate([
|
|
130
130
|
], ScreenController.prototype, "delete", null);
|
131
131
|
exports.ScreenController = ScreenController = __decorate([
|
132
132
|
(0, role_decorator_1.Role)(),
|
133
|
-
(0, common_1.Controller)('
|
133
|
+
(0, common_1.Controller)('screen'),
|
134
134
|
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => screen_service_1.ScreenService))),
|
135
135
|
__metadata("design:paramtypes", [screen_service_1.ScreenService])
|
136
136
|
], ScreenController);
|
@@ -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,
|
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,IAAI,CAAe,gBAAgB,EAAY,MAAM;QACzD,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC3D,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;Q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edhog/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;
|
@@ -12,7 +12,7 @@ export declare class ScreenService {
|
|
12
12
|
updateRoutes(screenId: number, { ids }: UpdateIdsDTO): Promise<any>;
|
13
13
|
listRoutes(screenId: number, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
14
14
|
listRoles(locale: string, screenId: number, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
15
|
-
|
15
|
+
list(locale: string, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
16
16
|
get(screenId: number): Promise<any>;
|
17
17
|
create({ name, slug, description, icon }: CreateDTO): Promise<any>;
|
18
18
|
update({ id, data }: {
|
@@ -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,
|
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,S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