@hedhog/admin 0.0.122 → 0.0.123
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth/auth.controller.d.ts +10 -1
- package/dist/auth/auth.controller.d.ts.map +1 -1
- package/dist/auth/auth.controller.js +6 -6
- package/dist/auth/auth.controller.js.map +1 -1
- package/dist/auth/auth.service.d.ts +10 -1
- package/dist/auth/auth.service.d.ts.map +1 -1
- package/dist/auth/guards/auth.guard.js +2 -2
- package/dist/auth/guards/auth.guard.js.map +1 -1
- package/dist/menu/dto/create.dto.d.ts +1 -1
- package/dist/menu/dto/create.dto.js +3 -3
- package/dist/menu/menu.controller.d.ts +33 -6
- package/dist/menu/menu.controller.d.ts.map +1 -1
- package/dist/menu/menu.controller.js +5 -5
- package/dist/menu/menu.controller.js.map +1 -1
- package/dist/menu/menu.service.d.ts +33 -6
- package/dist/menu/menu.service.d.ts.map +1 -1
- package/dist/menu/menu.service.js +4 -4
- package/dist/menu/menu.service.js.map +1 -1
- package/dist/menu/menu.service.spec.d.ts +0 -1
- package/dist/menu/menu.service.spec.js +206 -190
- package/dist/menu/menu.service.spec.js.map +1 -1
- package/dist/role/guards/role.guard.js +3 -3
- package/dist/role/guards/role.guard.js.map +1 -1
- package/dist/role/role.controller.d.ts +5 -5
- package/dist/role/role.controller.js +4 -4
- package/dist/role/role.controller.js.map +1 -1
- package/dist/role/role.service.d.ts +7 -7
- package/dist/role/role.service.d.ts.map +1 -1
- package/dist/role/role.service.js +8 -4
- package/dist/role/role.service.js.map +1 -1
- package/dist/route/route.controller.d.ts +27 -6
- package/dist/route/route.controller.d.ts.map +1 -1
- package/dist/route/route.controller.js +2 -2
- package/dist/route/route.controller.js.map +1 -1
- package/dist/route/route.service.d.ts +27 -6
- package/dist/route/route.service.d.ts.map +1 -1
- package/dist/route/route.service.spec.d.ts +0 -1
- package/dist/route/route.service.spec.js +260 -249
- package/dist/route/route.service.spec.js.map +1 -1
- package/dist/screen/dto/create.dto.d.ts +0 -2
- package/dist/screen/dto/create.dto.d.ts.map +1 -1
- package/dist/screen/dto/create.dto.js +0 -10
- package/dist/screen/dto/create.dto.js.map +1 -1
- package/dist/screen/screen.controller.d.ts +24 -6
- package/dist/screen/screen.controller.d.ts.map +1 -1
- package/dist/screen/screen.controller.js +2 -2
- package/dist/screen/screen.controller.js.map +1 -1
- package/dist/screen/screen.service.d.ts +24 -6
- package/dist/screen/screen.service.d.ts.map +1 -1
- package/dist/screen/screen.service.js +1 -3
- package/dist/screen/screen.service.js.map +1 -1
- package/dist/screen/screen.service.spec.d.ts +0 -1
- package/dist/screen/screen.service.spec.js +257 -240
- package/dist/screen/screen.service.spec.js.map +1 -1
- package/dist/user/user.controller.d.ts +32 -5
- package/dist/user/user.controller.d.ts.map +1 -1
- package/dist/user/user.controller.js +2 -2
- package/dist/user/user.controller.js.map +1 -1
- package/dist/user/user.service.d.ts +32 -5
- package/dist/user/user.service.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/auth/auth.controller.ts +1 -1
- package/src/auth/guards/auth.guard.ts +1 -1
- package/src/menu/dto/create.dto.ts +3 -3
- package/src/menu/menu.controller.ts +3 -3
- package/src/menu/menu.service.spec.ts +247 -247
- package/src/menu/menu.service.ts +3 -3
- package/src/role/guards/role.guard.ts +1 -1
- package/src/role/role.controller.ts +3 -3
- package/src/role/role.service.ts +8 -21
- package/src/route/route.controller.ts +1 -1
- package/src/route/route.service.spec.ts +300 -300
- package/src/screen/dto/create.dto.ts +0 -8
- package/src/screen/screen.controller.ts +1 -1
- package/src/screen/screen.service.spec.ts +298 -298
- package/src/screen/screen.service.ts +1 -3
- package/src/user/user.controller.ts +1 -1
@@ -6,7 +6,16 @@ import { User as UserType } from './types/user.type';
|
|
6
6
|
export declare class AuthController {
|
7
7
|
private readonly service;
|
8
8
|
constructor(service: AuthService);
|
9
|
-
verify({ id }: UserType): Promise<
|
9
|
+
verify({ id }: UserType): Promise<{
|
10
|
+
code: string | null;
|
11
|
+
name: string;
|
12
|
+
id: number;
|
13
|
+
created_at: Date;
|
14
|
+
updated_at: Date;
|
15
|
+
multifactor_id: number | null;
|
16
|
+
email: string;
|
17
|
+
password: string;
|
18
|
+
}>;
|
10
19
|
login({ email, password }: LoginDTO): Promise<{
|
11
20
|
token: string;
|
12
21
|
} | {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"auth.controller.d.ts","sourceRoot":"","sources":["../../src/auth/auth.controller.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAErD,qBACa,cAAc;IAGvB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,WAAW;IAKjC,MAAM,CAAS,EAAE,EAAE,EAAE,EAAE,QAAQ
|
1
|
+
{"version":3,"file":"auth.controller.d.ts","sourceRoot":"","sources":["../../src/auth/auth.controller.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAErD,qBACa,cAAc;IAGvB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,WAAW;IAKjC,MAAM,CAAS,EAAE,EAAE,EAAE,EAAE,QAAQ;;;;;;;;;;IAM/B,KAAK,CAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,QAAQ;;;;;;IAM3C,GAAG,CAAS,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,MAAM;;;IAMnC,MAAM,CAAS,EAAE,KAAK,EAAE,EAAE,SAAS;CAG1C"}
|
@@ -14,7 +14,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
15
|
exports.AuthController = void 0;
|
16
16
|
const common_1 = require("@nestjs/common");
|
17
|
-
const
|
17
|
+
const core_1 = require("@hedhog/core");
|
18
18
|
const auth_service_1 = require("./auth.service");
|
19
19
|
const forget_dto_1 = require("./dto/forget.dto");
|
20
20
|
const login_dto_1 = require("./dto/login.dto");
|
@@ -38,15 +38,15 @@ let AuthController = class AuthController {
|
|
38
38
|
};
|
39
39
|
exports.AuthController = AuthController;
|
40
40
|
__decorate([
|
41
|
-
(0,
|
41
|
+
(0, core_1.Role)(),
|
42
42
|
(0, common_1.Get)('verify'),
|
43
|
-
__param(0, (0,
|
43
|
+
__param(0, (0, core_1.User)()),
|
44
44
|
__metadata("design:type", Function),
|
45
45
|
__metadata("design:paramtypes", [Object]),
|
46
46
|
__metadata("design:returntype", Promise)
|
47
47
|
], AuthController.prototype, "verify", null);
|
48
48
|
__decorate([
|
49
|
-
(0,
|
49
|
+
(0, core_1.Public)(),
|
50
50
|
(0, common_1.Post)('login'),
|
51
51
|
__param(0, (0, common_1.Body)()),
|
52
52
|
__metadata("design:type", Function),
|
@@ -54,7 +54,7 @@ __decorate([
|
|
54
54
|
__metadata("design:returntype", Promise)
|
55
55
|
], AuthController.prototype, "login", null);
|
56
56
|
__decorate([
|
57
|
-
(0,
|
57
|
+
(0, core_1.Public)(),
|
58
58
|
(0, common_1.Post)('otp'),
|
59
59
|
__param(0, (0, common_1.Body)()),
|
60
60
|
__metadata("design:type", Function),
|
@@ -62,7 +62,7 @@ __decorate([
|
|
62
62
|
__metadata("design:returntype", Promise)
|
63
63
|
], AuthController.prototype, "otp", null);
|
64
64
|
__decorate([
|
65
|
-
(0,
|
65
|
+
(0, core_1.Public)(),
|
66
66
|
(0, common_1.Post)('forget'),
|
67
67
|
__param(0, (0, common_1.Body)()),
|
68
68
|
__metadata("design:type", Function),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"auth.controller.js","sourceRoot":"","sources":["../../src/auth/auth.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAOwB;AACxB,
|
1
|
+
{"version":3,"file":"auth.controller.js","sourceRoot":"","sources":["../../src/auth/auth.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAOwB;AACxB,uCAAkD;AAClD,iDAA6C;AAC7C,iDAA6C;AAC7C,+CAA2C;AAC3C,2CAAuC;AAIhC,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,YAEmB,OAAoB;QAApB,YAAO,GAAP,OAAO,CAAa;IACpC,CAAC;IAIE,AAAN,KAAK,CAAC,MAAM,CAAS,EAAE,EAAE,EAAY;QACnC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC;IAIK,AAAN,KAAK,CAAC,KAAK,CAAS,EAAE,KAAK,EAAE,QAAQ,EAAY;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IACjD,CAAC;IAIK,AAAN,KAAK,CAAC,GAAG,CAAS,EAAE,KAAK,EAAE,IAAI,EAAU;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3C,CAAC;IAIK,AAAN,KAAK,CAAC,MAAM,CAAS,EAAE,KAAK,EAAa;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IACxC,CAAC;CACF,CAAA;AA7BY,wCAAc;AAQnB;IAFL,IAAA,WAAI,GAAE;IACN,IAAA,YAAG,EAAC,QAAQ,CAAC;IACA,WAAA,IAAA,WAAI,GAAE,CAAA;;;;4CAEnB;AAIK;IAFL,IAAA,aAAM,GAAE;IACR,IAAA,aAAI,EAAC,OAAO,CAAC;IACD,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAsB,oBAAQ;;2CAEhD;AAIK;IAFL,IAAA,aAAM,GAAE;IACR,IAAA,aAAI,EAAC,KAAK,CAAC;IACD,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAkB,gBAAM;;yCAExC;AAIK;IAFL,IAAA,aAAM,GAAE;IACR,IAAA,aAAI,EAAC,QAAQ,CAAC;IACD,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAY,sBAAS;;4CAExC;yBA5BU,cAAc;IAD1B,IAAA,mBAAU,EAAC,MAAM,CAAC;IAGd,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC,CAAC,CAAA;qCACZ,0BAAW;GAH5B,cAAc,CA6B1B"}
|
@@ -31,6 +31,15 @@ export declare class AuthService {
|
|
31
31
|
token: string;
|
32
32
|
mfa: boolean;
|
33
33
|
}>;
|
34
|
-
verify(id: number):
|
34
|
+
verify(id: number): import(".prisma/client").Prisma.Prisma__userClient<{
|
35
|
+
code: string | null;
|
36
|
+
name: string;
|
37
|
+
id: number;
|
38
|
+
created_at: Date;
|
39
|
+
updated_at: Date;
|
40
|
+
multifactor_id: number | null;
|
41
|
+
email: string;
|
42
|
+
password: string;
|
43
|
+
}, null, import("@prisma/client/runtime/library").DefaultArgs>;
|
35
44
|
}
|
36
45
|
//# sourceMappingURL=auth.service.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"auth.service.d.ts","sourceRoot":"","sources":["../../src/auth/auth.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO/C,OAAO,EAAE,U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a,WAAW;IAGpB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAEvB,OAAO,CAAC,QAAQ,CAAC,GAAG;IAEpB,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAJJ,MAAM,EAAE,aAAa,EAErB,GAAG,EAAE,UAAU,EAEf,IAAI,EAAE,WAAW;IAG9B,WAAW,CAAC,KAAK,EAAE,MAAM;IAM/B,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAW5C,oBAAoB,IAAI,MAAM;IAMxB,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;;;;;IAgDzD,QAAQ,CAAC,IAAI,KAAA;;;IAUb,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,SAAS;IAkC3B,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,MAAM;;;IA0BjC,KAAK,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,QAAQ;;;;;;IAInC,MAAM,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;CAGlB"}
|
@@ -13,14 +13,14 @@ exports.AuthGuard = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
14
14
|
const core_1 = require("@nestjs/core");
|
15
15
|
const auth_service_1 = require("../auth.service");
|
16
|
-
const
|
16
|
+
const core_2 = require("@hedhog/core");
|
17
17
|
let AuthGuard = class AuthGuard {
|
18
18
|
constructor(auth, reflector) {
|
19
19
|
this.auth = auth;
|
20
20
|
this.reflector = reflector;
|
21
21
|
}
|
22
22
|
async canActivate(context) {
|
23
|
-
const isPublic = this.reflector.getAllAndOverride(
|
23
|
+
const isPublic = this.reflector.getAllAndOverride(core_2.IS_PUBLIC_KEY, [
|
24
24
|
context.getHandler(),
|
25
25
|
context.getClass(),
|
26
26
|
]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"auth.guard.js","sourceRoot":"","sources":["../../../src/auth/guards/auth.guard.ts"],"names":[],"mappings":";;;;;;;;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AC,OAAO,CAAC,aAAa,0CAAE,KAAK,CAAC,GAAG,CAAC,mCAAI,EAAE,CAAC;QAEtE,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/C,CAAC;CACF,CAAA;AArCY,8BAAS;oBAAT,SAAS;IADrB,IAAA,mBAAU,GAAE;qCAGK,0BAAW;QACN,gBAAS;GAHnB,SAAS,CAqCrB"}
|
@@ -15,10 +15,10 @@ class CreateDTO {
|
|
15
15
|
}
|
16
16
|
exports.CreateDTO = CreateDTO;
|
17
17
|
__decorate([
|
18
|
-
(0, class_validator_1.IsString)({ message: 'O
|
19
|
-
(0, class_validator_1.IsNotEmpty)({ message: 'O
|
18
|
+
(0, class_validator_1.IsString)({ message: 'O slug deve ser uma string' }),
|
19
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'O slug é obrigatório.' }),
|
20
20
|
__metadata("design:type", String)
|
21
|
-
], CreateDTO.prototype, "
|
21
|
+
], CreateDTO.prototype, "slug", void 0);
|
22
22
|
__decorate([
|
23
23
|
(0, class_validator_1.IsString)({ message: 'A url deve ser uma string' }),
|
24
24
|
(0, class_validator_1.IsNotEmpty)({ message: 'A url é obrigatório.' }),
|
@@ -13,12 +13,39 @@ export declare class MenuController {
|
|
13
13
|
list(paginationParams: any, locale: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
14
14
|
listRoles(menuId: number, paginationParams: any, locale: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
15
15
|
listScreens(menuId: number, paginationParams: any, locale: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
16
|
-
updateRoles(menuId: number, data: UpdateIdsDTO): Promise<
|
17
|
-
updateScreens(menuId: number, data: UpdateIdsDTO): Promise<
|
18
|
-
show(menuId: number): Promise<
|
19
|
-
|
20
|
-
|
21
|
-
|
16
|
+
updateRoles(menuId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
17
|
+
updateScreens(menuId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
18
|
+
show(menuId: number): Promise<{
|
19
|
+
id: number;
|
20
|
+
created_at: Date;
|
21
|
+
updated_at: Date;
|
22
|
+
slug: string;
|
23
|
+
icon: string | null;
|
24
|
+
menu_id: number | null;
|
25
|
+
url: string | null;
|
26
|
+
order: number;
|
27
|
+
}>;
|
28
|
+
create(data: CreateDTO): Promise<{
|
29
|
+
id: number;
|
30
|
+
created_at: Date;
|
31
|
+
updated_at: Date;
|
32
|
+
slug: string;
|
33
|
+
icon: string | null;
|
34
|
+
menu_id: number | null;
|
35
|
+
url: string | null;
|
36
|
+
order: number;
|
37
|
+
}>;
|
38
|
+
update(menuId: number, data: UpdateDTO): Promise<{
|
39
|
+
id: number;
|
40
|
+
created_at: Date;
|
41
|
+
updated_at: Date;
|
42
|
+
slug: string;
|
43
|
+
icon: string | null;
|
44
|
+
menu_id: number | null;
|
45
|
+
url: string | null;
|
46
|
+
order: number;
|
47
|
+
}>;
|
48
|
+
delete(data: DeleteDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
22
49
|
updateOrder(data: OrderDTO): Promise<void>;
|
23
50
|
}
|
24
51
|
//# sourceMappingURL=menu.controller.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"menu.controller.d.ts","sourceRoot":"","sources":["../../src/menu/menu.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,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBA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ACpB,MAAM,KAAA;IAMZ,WAAW,CACgB,MAAM,EAAE,MAAM,EACrC,IAAI,EAAE,YAAY;IAMtB,aAAa,CACc,MAAM,EAAE,MAAM,EACrC,IAAI,EAAE,YAAY;IAMtB,IAAI,CAAgC,MAAM,EAAE,MAAM;;;;;;;;;;IAKlD,MAAM,CAAS,IAAI,EAAE,SAAS;;;;;;;;;;IAK9B,MAAM,CACqB,MAAM,EAAE,MAAM,EACrC,IAAI,EAAE,SAAS;;;;;;;;;;IASnB,MAAM,CAAS,IAAI,EAAE,SAAS;IAK9B,WAAW,CAAS,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAGzD"}
|
@@ -18,7 +18,7 @@ const common_1 = require("@nestjs/common");
|
|
18
18
|
const delete_dto_1 = require("../dto/delete.dto");
|
19
19
|
const update_ids_dto_1 = require("../dto/update-ids.dto");
|
20
20
|
const locale_1 = require("@hedhog/locale");
|
21
|
-
const
|
21
|
+
const core_1 = require("@hedhog/core");
|
22
22
|
const create_dto_1 = require("./dto/create.dto");
|
23
23
|
const order_dto_1 = require("./dto/order.dto");
|
24
24
|
const update_dto_1 = require("./dto/update.dto");
|
@@ -67,7 +67,7 @@ let MenuController = class MenuController {
|
|
67
67
|
exports.MenuController = MenuController;
|
68
68
|
__decorate([
|
69
69
|
(0, common_1.Get)('system'),
|
70
|
-
__param(0, (0,
|
70
|
+
__param(0, (0, core_1.User)()),
|
71
71
|
__param(1, (0, locale_1.Locale)()),
|
72
72
|
__metadata("design:type", Function),
|
73
73
|
__metadata("design:paramtypes", [Object, Object]),
|
@@ -91,7 +91,7 @@ __decorate([
|
|
91
91
|
__metadata("design:returntype", Promise)
|
92
92
|
], MenuController.prototype, "listRoles", null);
|
93
93
|
__decorate([
|
94
|
-
(0, common_1.Get)(':menuId/
|
94
|
+
(0, common_1.Get)(':menuId/screen'),
|
95
95
|
__param(0, (0, common_1.Param)('menuId', common_1.ParseIntPipe)),
|
96
96
|
__param(1, (0, pagination_1.Pagination)()),
|
97
97
|
__param(2, (0, locale_1.Locale)()),
|
@@ -108,7 +108,7 @@ __decorate([
|
|
108
108
|
__metadata("design:returntype", Promise)
|
109
109
|
], MenuController.prototype, "updateRoles", null);
|
110
110
|
__decorate([
|
111
|
-
(0, common_1.Patch)(':menuId/
|
111
|
+
(0, common_1.Patch)(':menuId/screen'),
|
112
112
|
__param(0, (0, common_1.Param)('menuId', common_1.ParseIntPipe)),
|
113
113
|
__param(1, (0, common_1.Body)()),
|
114
114
|
__metadata("design:type", Function),
|
@@ -152,7 +152,7 @@ __decorate([
|
|
152
152
|
__metadata("design:returntype", Promise)
|
153
153
|
], MenuController.prototype, "updateOrder", null);
|
154
154
|
exports.MenuController = MenuController = __decorate([
|
155
|
-
(0,
|
155
|
+
(0, core_1.Role)(),
|
156
156
|
(0, common_1.Controller)('menu'),
|
157
157
|
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => menu_service_1.MenuService))),
|
158
158
|
__metadata("design:paramtypes", [menu_service_1.MenuService])
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"menu.controller.js","sourceRoot":"","sources":["../../src/menu/menu.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAWwB;AACxB,kDAA8C;AAC9C,0DAAqD;AACrD,2CAAwC;AACxC,
|
1
|
+
{"version":3,"file":"menu.controller.js","sourceRoot":"","sources":["../../src/menu/menu.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAWwB;AACxB,kDAA8C;AAC9C,0DAAqD;AACrD,2CAAwC;AACxC,uCAA0C;AAC1C,iDAA6C;AAC7C,+CAA2C;AAC3C,iDAA6C;AAC7C,iDAA6C;AAItC,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,YAEmB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;IACxC,CAAC;IAGE,AAAN,KAAK,CAAC,aAAa,CAAS,EAAE,EAAE,EA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,CAAA;IAC7B,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,6BAAY;;mDAG3B;AAGK;IADL,IAAA,YAAG,EAAC,SAAS,CAAC;IACH,WAAA,IAAA,cAAK,EAAC,QAAQ,EAAE,qBAAY,CAAC,CAAA;;;;0CAExC;AAGK;IADL,IAAA,aAAI,GAAE;IACO,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;4CAEnC;AAGK;IADL,IAAA,cAAK,EAAC,SAAS,CAAC;IAEd,WAAA,IAAA,cAAK,EAAC,QAAQ,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;AAGK;IADL,IAAA,cAAK,EAAC,OAAO,CAAC;IACI,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,oBAAQ;;iDAEvC;yBA/EU,cAAc;IAF1B,IAAA,WAAI,GAAE;IACN,IAAA,mBAAU,EAAC,MAAM,CAAC;IAGd,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC,CAAC,CAAA;qCACR,0BAAW;GAHhC,cAAc,CAgF1B"}
|
@@ -9,20 +9,47 @@ export declare class MenuService {
|
|
9
9
|
private readonly prismaService;
|
10
10
|
private readonly paginationService;
|
11
11
|
constructor(prismaService: PrismaService, paginationService: PaginationService);
|
12
|
-
updateScreens(menuId: number, data: UpdateIdsDTO): Promise<
|
13
|
-
updateRoles(menuId: number, data: UpdateIdsDTO): Promise<
|
12
|
+
updateScreens(menuId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
13
|
+
updateRoles(menuId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
14
14
|
listScreens(locale: string, menuId: number, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
15
15
|
listRoles(locale: string, menuId: number, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
16
16
|
getMenus(locale: string, userId: number, menuId?: number): Promise<any[]>;
|
17
17
|
getSystemMenu(locale: string, userId: number): Promise<any[]>;
|
18
18
|
list(locale: string, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
19
|
-
get(menuId: number): Promise<
|
20
|
-
|
19
|
+
get(menuId: number): Promise<{
|
20
|
+
id: number;
|
21
|
+
created_at: Date;
|
22
|
+
updated_at: Date;
|
23
|
+
slug: string;
|
24
|
+
icon: string | null;
|
25
|
+
menu_id: number | null;
|
26
|
+
url: string | null;
|
27
|
+
order: number;
|
28
|
+
}>;
|
29
|
+
create({ slug, url, icon, order, menuId }: CreateDTO): Promise<{
|
30
|
+
id: number;
|
31
|
+
created_at: Date;
|
32
|
+
updated_at: Date;
|
33
|
+
slug: string;
|
34
|
+
icon: string | null;
|
35
|
+
menu_id: number | null;
|
36
|
+
url: string | null;
|
37
|
+
order: number;
|
38
|
+
}>;
|
21
39
|
update({ id, data }: {
|
22
40
|
id: number;
|
23
41
|
data: UpdateDTO;
|
24
|
-
}): Promise<
|
25
|
-
|
42
|
+
}): Promise<{
|
43
|
+
id: number;
|
44
|
+
created_at: Date;
|
45
|
+
updated_at: Date;
|
46
|
+
slug: string;
|
47
|
+
icon: string | null;
|
48
|
+
menu_id: number | null;
|
49
|
+
url: string | null;
|
50
|
+
order: number;
|
51
|
+
}>;
|
52
|
+
delete({ ids }: DeleteDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
26
53
|
updateOrder({ ids }: OrderDTO): Promise<void>;
|
27
54
|
}
|
28
55
|
//# sourceMappingURL=menu.service.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"menu.service.d.ts","sourceRoot":"","sources":["../../src/menu/menu.service.ts"],"names":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AAE;;;;;;;;;;IAOpD,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS;IAgBzB,WAAW,CAAC,EAAE,GAAG,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAsBpD"}
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.MenuService = void 0;
|
16
16
|
const pagination_1 = require("@hedhog/pagination");
|
17
17
|
const prisma_1 = require("@hedhog/prisma");
|
18
|
-
const
|
18
|
+
const core_1 = require("@hedhog/core");
|
19
19
|
const common_1 = require("@nestjs/common");
|
20
20
|
let MenuService = class MenuService {
|
21
21
|
constructor(prismaService, paginationService) {
|
@@ -136,7 +136,7 @@ let MenuService = class MenuService {
|
|
136
136
|
},
|
137
137
|
},
|
138
138
|
}));
|
139
|
-
menu = menu.map((m) => (0,
|
139
|
+
menu = menu.map((m) => (0, core_1.itemTranslations)('menu_locale', m));
|
140
140
|
for (let i = 0; i < menu.length; i++) {
|
141
141
|
menu[i].menu = await this.getMenus(locale, userId, menu[i].id);
|
142
142
|
}
|
@@ -171,9 +171,9 @@ let MenuService = class MenuService {
|
|
171
171
|
where: { id: menuId },
|
172
172
|
});
|
173
173
|
}
|
174
|
-
async create({
|
174
|
+
async create({ slug, url, icon, order, menuId }) {
|
175
175
|
return this.prismaService.menu.create({
|
176
|
-
data: {
|
176
|
+
data: { slug, url, icon, order, menu_id: menuId },
|
177
177
|
});
|
178
178
|
}
|
179
179
|
async update({ id, data }) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"menu.service.js","sourceRoot":"","sources":["../../src/menu/menu.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAsE;AACtE,2CAA+C;AAC/C,
|
1
|
+
{"version":3,"file":"menu.service.js","sourceRoot":"","sources":["../../src/menu/menu.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAsE;AACtE,2CAA+C;AAC/C,uCAAgD;A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