@hedhog/admin 0.7.5 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin.module.d.ts.map +1 -1
- package/dist/admin.module.js +3 -0
- package/dist/admin.module.js.map +1 -1
- package/dist/auth/auth.controller.d.ts +13 -2
- package/dist/auth/auth.controller.d.ts.map +1 -1
- package/dist/auth/auth.service.d.ts +13 -2
- package/dist/auth/auth.service.d.ts.map +1 -1
- package/dist/auth/auth.service.js +6 -3
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/auth/consts/body.d.ts +2 -0
- package/dist/auth/consts/body.d.ts.map +1 -0
- package/dist/auth/consts/body.js +31 -0
- package/dist/auth/consts/body.js.map +1 -0
- package/dist/auth/consts/subject.d.ts +2 -0
- package/dist/auth/consts/subject.d.ts.map +1 -0
- package/dist/auth/consts/subject.js +5 -0
- package/dist/auth/consts/subject.js.map +1 -0
- package/dist/menu/menu.controller.d.ts +39 -12
- package/dist/menu/menu.controller.d.ts.map +1 -1
- package/dist/menu/menu.service.d.ts +39 -12
- package/dist/menu/menu.service.d.ts.map +1 -1
- package/dist/role/role.controller.d.ts +15 -15
- package/dist/role/role.service.d.ts +15 -15
- package/dist/route/route.controller.d.ts +33 -12
- package/dist/route/route.controller.d.ts.map +1 -1
- package/dist/route/route.service.d.ts +33 -12
- package/dist/route/route.service.d.ts.map +1 -1
- package/dist/screen/screen.controller.d.ts +30 -12
- package/dist/screen/screen.controller.d.ts.map +1 -1
- package/dist/screen/screen.service.d.ts +30 -12
- package/dist/screen/screen.service.d.ts.map +1 -1
- package/dist/user/user.controller.d.ts +36 -9
- package/dist/user/user.controller.d.ts.map +1 -1
- package/dist/user/user.service.d.ts +36 -9
- package/dist/user/user.service.d.ts.map +1 -1
- package/package.json +43 -43
- package/src/admin.module.ts +3 -0
- package/src/auth/auth.service.ts +9 -8
- package/src/auth/consts/body.ts +26 -0
- package/src/auth/consts/subject.ts +1 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"admin.module.d.ts","sourceRoot":"","sources":["../src/admin.module.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"admin.module.d.ts","sourceRoot":"","sources":["../src/admin.module.ts"],"names":[],"mappings":"AAYA,qBAwBa,WAAW;CAAG"}
|
package/dist/admin.module.js
CHANGED
@@ -17,6 +17,7 @@ const role_module_1 = require("./role/role.module");
|
|
17
17
|
const route_module_1 = require("./route/route.module");
|
18
18
|
const screen_module_1 = require("./screen/screen.module");
|
19
19
|
const user_module_1 = require("./user/user.module");
|
20
|
+
const mail_1 = require("@hedhog/mail");
|
20
21
|
let AdminModule = class AdminModule {
|
21
22
|
};
|
22
23
|
exports.AdminModule = AdminModule;
|
@@ -24,6 +25,7 @@ exports.AdminModule = AdminModule = __decorate([
|
|
24
25
|
(0, common_1.Module)({
|
25
26
|
imports: [
|
26
27
|
(0, common_1.forwardRef)(() => auth_module_1.AuthModule),
|
28
|
+
(0, common_1.forwardRef)(() => mail_1.MailModule),
|
27
29
|
(0, common_1.forwardRef)(() => menu_module_1.MenuModule),
|
28
30
|
(0, common_1.forwardRef)(() => pagination_1.PaginationModule),
|
29
31
|
(0, common_1.forwardRef)(() => role_module_1.RoleModule),
|
@@ -36,6 +38,7 @@ exports.AdminModule = AdminModule = __decorate([
|
|
36
38
|
exports: [
|
37
39
|
user_module_1.UserModule,
|
38
40
|
auth_module_1.AuthModule,
|
41
|
+
mail_1.MailModule,
|
39
42
|
route_module_1.RouteModule,
|
40
43
|
role_module_1.RoleModule,
|
41
44
|
menu_module_1.MenuModule,
|
package/dist/admin.module.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"admin.module.js","sourceRoot":"","sources":["../src/admin.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAsD;AACtD,2CAA8C;AAC9C,2CAAoD;AACpD,oDAAgD;AAChD,2CAA8C;AAC9C,oDAAgD;AAChD,oDAAgD;AAChD,uDAAmD;AACnD,0DAAsD;AACtD,oDAAgD;
|
1
|
+
{"version":3,"file":"admin.module.js","sourceRoot":"","sources":["../src/admin.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAsD;AACtD,2CAA8C;AAC9C,2CAAoD;AACpD,oDAAgD;AAChD,2CAA8C;AAC9C,oDAAgD;AAChD,oDAAgD;AAChD,uDAAmD;AACnD,0DAAsD;AACtD,oDAAgD;AAChD,uCAA0C;AA0BnC,IAAM,WAAW,GAAjB,MAAM,WAAW;CAAG,CAAA;AAAd,kCAAW;sBAAX,WAAW;IAxBvB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,iBAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6BAAgB,CAAC;YAClC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC;YAC7B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;SAC7B;QACD,OAAO,EAAE;YACP,wBAAU;YACV,wBAAU;YACV,iBAAU;YACV,0BAAW;YACX,wBAAU;YACV,wBAAU;YACV,4BAAY;YACZ,qBAAY;SACb;KACF,CAAC;GACW,WAAW,CAAG"}
|
@@ -7,7 +7,16 @@ import { User as UserType } from './types/user.type';
|
|
7
7
|
export declare class AuthController {
|
8
8
|
private readonly service;
|
9
9
|
constructor(service: AuthService);
|
10
|
-
verify({ id }: UserType): Promise<
|
10
|
+
verify({ id }: UserType): Promise<{
|
11
|
+
code: string | null;
|
12
|
+
name: string;
|
13
|
+
id: number;
|
14
|
+
created_at: Date;
|
15
|
+
updated_at: Date;
|
16
|
+
multifactor_id: number | null;
|
17
|
+
email: string;
|
18
|
+
password: string;
|
19
|
+
}>;
|
11
20
|
login({ email, password }: LoginDTO): Promise<{
|
12
21
|
token: string;
|
13
22
|
} | {
|
@@ -21,6 +30,8 @@ export declare class AuthController {
|
|
21
30
|
subject: string;
|
22
31
|
body: string;
|
23
32
|
}): Promise<boolean>;
|
24
|
-
reset({ newPassword, confirmNewPassword, code, }: ResetDTO): Promise<
|
33
|
+
reset({ newPassword, confirmNewPassword, code, }: ResetDTO): Promise<false | {
|
34
|
+
token: string;
|
35
|
+
}>;
|
25
36
|
}
|
26
37
|
//# sourceMappingURL=auth.controller.d.ts.map
|
@@ -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,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,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,EACnB,KAAK,EACL,OAAO,EACP,IAAI,GACL,EAAE,SAAS,GAAG;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;KACd;IAUK,KAAK,CAAS,EAClB,WAAW,EACX,kBAAkB,EAClB,IAAI,GACL,EAAE,QAAQ;;;CAOZ"}
|
@@ -29,7 +29,9 @@ export declare class AuthService {
|
|
29
29
|
code: string;
|
30
30
|
newPassword: string;
|
31
31
|
confirmNewPassword: string;
|
32
|
-
}): Promise<
|
32
|
+
}): Promise<false | {
|
33
|
+
token: string;
|
34
|
+
}>;
|
33
35
|
otp({ token, code }: OtpDTO): Promise<{
|
34
36
|
token: string;
|
35
37
|
}>;
|
@@ -39,6 +41,15 @@ export declare class AuthService {
|
|
39
41
|
token: string;
|
40
42
|
mfa: boolean;
|
41
43
|
}>;
|
42
|
-
verify(id: number):
|
44
|
+
verify(id: number): import(".prisma/client").Prisma.Prisma__userClient<{
|
45
|
+
code: string | null;
|
46
|
+
name: string;
|
47
|
+
id: number;
|
48
|
+
created_at: Date;
|
49
|
+
updated_at: Date;
|
50
|
+
multifactor_id: number | null;
|
51
|
+
email: string;
|
52
|
+
password: string;
|
53
|
+
}, null, import("@prisma/client/runtime/library").DefaultArgs>;
|
43
54
|
}
|
44
55
|
//# 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;AAQ/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;
|
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;AAQ/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAMvC,qBACa,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,EACX,KAAK,EACL,OAAO,EACP,IAAI,GACL,EAAE,SAAS,GAAG;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;IAwCK,aAAa,CAAC,EAClB,IAAI,EACJ,WAAW,EACX,kBAAkB,GACnB,EAAE;QACD,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,kBAAkB,EAAE,MAAM,CAAC;KAC5B;;;IAkCK,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"}
|
@@ -19,6 +19,8 @@ const common_1 = require("@nestjs/common");
|
|
19
19
|
const jwt_1 = require("@nestjs/jwt");
|
20
20
|
const bcrypt_1 = require("bcrypt");
|
21
21
|
const multifactor_type_enum_1 = require("./enums/multifactor-type.enum");
|
22
|
+
const subject_1 = require("./consts/subject");
|
23
|
+
const body_1 = require("./consts/body");
|
22
24
|
let AuthService = class AuthService {
|
23
25
|
constructor(prisma, jwt, mail) {
|
24
26
|
this.prisma = prisma;
|
@@ -117,8 +119,8 @@ let AuthService = class AuthService {
|
|
117
119
|
});
|
118
120
|
await this.mail.send({
|
119
121
|
to: email,
|
120
|
-
subject: subject !== null && subject !== void 0 ? subject :
|
121
|
-
body: body !== null && body !== void 0 ? body :
|
122
|
+
subject: subject !== null && subject !== void 0 ? subject : subject_1.SUBJECT_RECOVERY,
|
123
|
+
body: body !== null && body !== void 0 ? body : (0, body_1.getBody)(`${process.env.FRONTEND_URL}/password-recovery/${code}`),
|
122
124
|
});
|
123
125
|
return true;
|
124
126
|
}
|
@@ -142,9 +144,10 @@ let AuthService = class AuthService {
|
|
142
144
|
},
|
143
145
|
data: {
|
144
146
|
password,
|
147
|
+
code: null,
|
145
148
|
},
|
146
149
|
});
|
147
|
-
return
|
150
|
+
return this.getToken(user);
|
148
151
|
}
|
149
152
|
return false;
|
150
153
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"auth.service.js","sourceRoot":"","sources":["../../src/auth/auth.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uCAA2C;AAC3C,2CAA+C;AAC/C,2CAMwB;AACxB,qCAAyC;AACzC,mCAAgD;AAIhD,yEAAgE;
|
1
|
+
{"version":3,"file":"auth.service.js","sourceRoot":"","sources":["../../src/auth/auth.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uCAA2C;AAC3C,2CAA+C;AAC/C,2CAMwB;AACxB,qCAAyC;AACzC,mCAAgD;AAIhD,yEAAgE;AAEhE,8CAAoD;AACpD,wCAAwC;AAGjC,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB,YAEmB,MAAqB,EAErB,GAAe,EAEf,IAAiB;QAJjB,WAAM,GAAN,MAAM,CAAe;QAErB,QAAG,GAAH,GAAG,CAAY;QAEf,SAAI,GAAJ,IAAI,CAAa;IACjC,CAAC;IAEJ,KAAK,CAAC,WAAW,CAAC,KAAa;QAC7B,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,EAAE;YACjC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;SACvC,CAAC,CAAC;IACL,CAAC;IAED,oBAAoB,CAAC,MAAc;QACjC,MAAM,UAAU,GACd,gEAAgE,CAAC;QACnE,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAA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E;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,gBAAU,CAAC,CAAC,CAAA;IAEpC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,kBAAW,CAAC,CAAC,CAAA;qCAHb,sBAAa;QAEhB,gBAAU;QAET,kBAAW;GAPzB,WAAW,CAqNvB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/auth/consts/body.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,QAAS,MAAM,KAAG,MAyBrC,CAAC"}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getBody = void 0;
|
4
|
+
const getBody = (url) => {
|
5
|
+
return `
|
6
|
+
<body style="font-family: Arial, sans-serif; background-color: #eef2f7; color: #333; margin: 0; padding: 0;">
|
7
|
+
<div style="max-width: 600px; margin: 40px auto; background-color: #ffffff; border: 1px solid #dcdfe6; border-radius: 10px; padding: 40px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);">
|
8
|
+
<div style="text-align: center; margin-bottom: 30px;">
|
9
|
+
<h1 style="color: #2c3e50; font-size: 26px; margin: 0;">Recuperação de Senha</h1>
|
10
|
+
</div>
|
11
|
+
<div style="line-height: 1.8; font-size: 16px; color: #555; text-align: justify;">
|
12
|
+
<p>Olá,</p>
|
13
|
+
<p>Recebemos uma solicitação para redefinir sua senha em nossa plataforma. Para garantir que você é o proprietário desta conta, criamos um link exclusivo para redefinir sua senha.</p>
|
14
|
+
<p>Se você não fez essa solicitação, entre em contato conosco imediatamente para garantir a segurança de sua conta.</p>
|
15
|
+
<p>Para redefinir sua senha, clique no botão abaixo:</p>
|
16
|
+
</div>
|
17
|
+
<div style="text-align: center; margin: 30px 0;">
|
18
|
+
<a href="${url}" style="display: inline-block; padding: 15px 30px; background-color: #3498db; color: #ffffff; text-decoration: none; font-size: 16px; font-weight: bold; border-radius: 8px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);">Redefinir Senha</a>
|
19
|
+
</div>
|
20
|
+
<div style="font-size: 14px; line-height: 1.7; color: #666;">
|
21
|
+
<p>Por razões de segurança, evite compartilhar suas informações de login ou clicar em links suspeitos.</p>
|
22
|
+
<p>Agradecemos por escolher nossa plataforma!</p>
|
23
|
+
</div>
|
24
|
+
<div style="text-align: center; font-size: 13px; color: #95a5a6; margin-top: 40px; border-top: 1px solid #ecf0f1; padding-top: 20px;">
|
25
|
+
<p>Este email foi enviado automaticamente. Por favor, não responda.</p>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</body>`;
|
29
|
+
};
|
30
|
+
exports.getBody = getBody;
|
31
|
+
//# sourceMappingURL=body.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"body.js","sourceRoot":"","sources":["../../../src/auth/consts/body.ts"],"names":[],"mappings":";;;AAAO,MAAM,OAAO,GAAG,CAAC,GAAW,EAAU,EAAE;IAC7C,OAAO;;;;;;;;;;;;;2CAakC,GAAG;;;;;;;;;;gBAU9B,CAAC;AACjB,CAAC,CAAC;AAzBW,QAAA,OAAO,WAyBlB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"subject.d.ts","sourceRoot":"","sources":["../../../src/auth/consts/subject.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,mCAAyB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"subject.js","sourceRoot":"","sources":["../../../src/auth/consts/subject.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,sBAAsB,CAAC"}
|
@@ -11,38 +11,65 @@ export declare class MenuController {
|
|
11
11
|
id: any;
|
12
12
|
}, locale: any): Promise<any[]>;
|
13
13
|
list(paginationParams: any, locale: any): Promise<{
|
14
|
-
total:
|
14
|
+
total: any;
|
15
15
|
lastPage: number;
|
16
16
|
page: number;
|
17
17
|
pageSize: number;
|
18
18
|
prev: number;
|
19
19
|
next: number;
|
20
|
-
data: any
|
20
|
+
data: any;
|
21
21
|
}>;
|
22
22
|
listRoles(menuId: number, paginationParams: any, locale: any): Promise<{
|
23
|
-
total:
|
23
|
+
total: any;
|
24
24
|
lastPage: number;
|
25
25
|
page: number;
|
26
26
|
pageSize: number;
|
27
27
|
prev: number;
|
28
28
|
next: number;
|
29
|
-
data: any
|
29
|
+
data: any;
|
30
30
|
}>;
|
31
31
|
listScreens(menuId: number, paginationParams: any, locale: any): Promise<{
|
32
|
-
total:
|
32
|
+
total: any;
|
33
33
|
lastPage: number;
|
34
34
|
page: number;
|
35
35
|
pageSize: number;
|
36
36
|
prev: number;
|
37
37
|
next: number;
|
38
|
-
data: any
|
38
|
+
data: any;
|
39
39
|
}>;
|
40
|
-
updateRoles(menuId: number, data: UpdateIdsDTO): Promise<
|
41
|
-
updateScreens(menuId: number, data: UpdateIdsDTO): Promise<
|
42
|
-
show(menuId: number): Promise<
|
43
|
-
|
44
|
-
|
45
|
-
|
40
|
+
updateRoles(menuId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
41
|
+
updateScreens(menuId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
42
|
+
show(menuId: number): Promise<{
|
43
|
+
id: number;
|
44
|
+
created_at: Date;
|
45
|
+
updated_at: Date;
|
46
|
+
menu_id: number | null;
|
47
|
+
slug: string;
|
48
|
+
url: string | null;
|
49
|
+
order: number;
|
50
|
+
icon: string | null;
|
51
|
+
}>;
|
52
|
+
create(data: CreateDTO): Promise<{
|
53
|
+
id: number;
|
54
|
+
created_at: Date;
|
55
|
+
updated_at: Date;
|
56
|
+
menu_id: number | null;
|
57
|
+
slug: string;
|
58
|
+
url: string | null;
|
59
|
+
order: number;
|
60
|
+
icon: string | null;
|
61
|
+
}>;
|
62
|
+
update(menuId: number, data: UpdateDTO): Promise<{
|
63
|
+
id: number;
|
64
|
+
created_at: Date;
|
65
|
+
updated_at: Date;
|
66
|
+
menu_id: number | null;
|
67
|
+
slug: string;
|
68
|
+
url: string | null;
|
69
|
+
order: number;
|
70
|
+
icon: string | null;
|
71
|
+
}>;
|
72
|
+
delete(data: DeleteDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
46
73
|
updateOrder(data: OrderDTO): Promise<void>;
|
47
74
|
}
|
48
75
|
//# 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,qBAEa,cAAc;IAGvB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAIrC,aAAa,CAAS,EAAE,EAAE,EAAE;;KAAA,EAAY,MAAM,KAAA;IAK9C,IAAI,CAAe,gBAAgB,KAAA,EAAY,MAAM,KAAA;;;;;;;;;IAKrD,SAAS,CACkB,MAAM,EAAE,MAAM,EAC/B,gBAAgB,KAAA,EACpB,MAAM,KAAA;;;;;;;;;IAMZ,WAAW,CACgB,MAAM,EAAE,MAAM,EAC/B,gBAAgB,KAAA,EACpB,MAAM,KAAA;;;;;;;;;IAMZ,WAAW,CACgB,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EAAE,SAAS;IAK9B,WAAW,CAAS,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAGzD"}
|
@@ -9,44 +9,71 @@ 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<{
|
15
|
-
total:
|
15
|
+
total: any;
|
16
16
|
lastPage: number;
|
17
17
|
page: number;
|
18
18
|
pageSize: number;
|
19
19
|
prev: number;
|
20
20
|
next: number;
|
21
|
-
data: any
|
21
|
+
data: any;
|
22
22
|
}>;
|
23
23
|
listRoles(locale: string, menuId: number, paginationParams: PaginationDTO): Promise<{
|
24
|
-
total:
|
24
|
+
total: any;
|
25
25
|
lastPage: number;
|
26
26
|
page: number;
|
27
27
|
pageSize: number;
|
28
28
|
prev: number;
|
29
29
|
next: number;
|
30
|
-
data: any
|
30
|
+
data: any;
|
31
31
|
}>;
|
32
32
|
getMenus(locale: string, userId: number, menuId?: number): Promise<any[]>;
|
33
33
|
getSystemMenu(locale: string, userId: number): Promise<any[]>;
|
34
34
|
list(locale: string, paginationParams: PaginationDTO): Promise<{
|
35
|
-
total:
|
35
|
+
total: any;
|
36
36
|
lastPage: number;
|
37
37
|
page: number;
|
38
38
|
pageSize: number;
|
39
39
|
prev: number;
|
40
40
|
next: number;
|
41
|
-
data: any
|
41
|
+
data: any;
|
42
|
+
}>;
|
43
|
+
get(menuId: number): Promise<{
|
44
|
+
id: number;
|
45
|
+
created_at: Date;
|
46
|
+
updated_at: Date;
|
47
|
+
menu_id: number | null;
|
48
|
+
slug: string;
|
49
|
+
url: string | null;
|
50
|
+
order: number;
|
51
|
+
icon: string | null;
|
52
|
+
}>;
|
53
|
+
create({ slug, url, icon, order, menuId }: CreateDTO): Promise<{
|
54
|
+
id: number;
|
55
|
+
created_at: Date;
|
56
|
+
updated_at: Date;
|
57
|
+
menu_id: number | null;
|
58
|
+
slug: string;
|
59
|
+
url: string | null;
|
60
|
+
order: number;
|
61
|
+
icon: string | null;
|
42
62
|
}>;
|
43
|
-
get(menuId: number): Promise<any>;
|
44
|
-
create({ slug, url, icon, order, menuId }: CreateDTO): Promise<any>;
|
45
63
|
update({ id, data }: {
|
46
64
|
id: number;
|
47
65
|
data: UpdateDTO;
|
48
|
-
}): Promise<
|
49
|
-
|
66
|
+
}): Promise<{
|
67
|
+
id: number;
|
68
|
+
created_at: Date;
|
69
|
+
updated_at: Date;
|
70
|
+
menu_id: number | null;
|
71
|
+
slug: string;
|
72
|
+
url: string | null;
|
73
|
+
order: number;
|
74
|
+
icon: string | null;
|
75
|
+
}>;
|
76
|
+
delete({ ids }: DeleteDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
50
77
|
updateOrder({ ids }: OrderDTO): Promise<void>;
|
51
78
|
}
|
52
79
|
//# sourceMappingURL=menu.service.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"menu.service.d.ts","sourceRoot":"","sources":["../../src/menu/menu.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAQ/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,QAAQ,EAAE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ginationParams: any, locale: any): Promise<{
|
10
|
-
total:
|
10
|
+
total: any;
|
11
11
|
lastPage: number;
|
12
12
|
page: number;
|
13
13
|
pageSize: number;
|
14
14
|
prev: number;
|
15
15
|
next: number;
|
16
|
-
data: any
|
16
|
+
data: any;
|
17
17
|
}>;
|
18
18
|
listUsers(paginationParams: any, roleId: number): Promise<{
|
19
|
-
total:
|
19
|
+
total: any;
|
20
20
|
lastPage: number;
|
21
21
|
page: number;
|
22
22
|
pageSize: number;
|
23
23
|
prev: number;
|
24
24
|
next: number;
|
25
|
-
data: any
|
25
|
+
data: any;
|
26
26
|
}>;
|
27
27
|
listMenus(paginationParams: any, roleId: number, locale: any): Promise<{
|
28
|
-
total:
|
28
|
+
total: any;
|
29
29
|
lastPage: number;
|
30
30
|
page: number;
|
31
31
|
pageSize: number;
|
32
32
|
prev: number;
|
33
33
|
next: number;
|
34
|
-
data: any
|
34
|
+
data: any;
|
35
35
|
}>;
|
36
36
|
listRoutes(paginationParams: any, roleId: number): Promise<{
|
37
|
-
total:
|
37
|
+
total: any;
|
38
38
|
lastPage: number;
|
39
39
|
page: number;
|
40
40
|
pageSize: number;
|
41
41
|
prev: number;
|
42
42
|
next: number;
|
43
|
-
data: any
|
43
|
+
data: any;
|
44
44
|
}>;
|
45
45
|
listScreens(paginationParams: any, roleId: number, locale: any): Promise<{
|
46
|
-
total:
|
46
|
+
total: any;
|
47
47
|
lastPage: number;
|
48
48
|
page: number;
|
49
49
|
pageSize: number;
|
50
50
|
prev: number;
|
51
51
|
next: number;
|
52
|
-
data: any
|
52
|
+
data: any;
|
53
53
|
}>;
|
54
|
-
updateUsers(roleId: number, data: UpdateIdsDTO): Promise<
|
55
|
-
updateMenus(roleId: number, data: UpdateIdsDTO): Promise<
|
56
|
-
updateRoutes(roleId: number, data: UpdateIdsDTO): Promise<
|
57
|
-
updateScreens(roleId: number, data: UpdateIdsDTO): Promise<
|
54
|
+
updateUsers(roleId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
55
|
+
updateMenus(roleId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
56
|
+
updateRoutes(roleId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
57
|
+
updateScreens(roleId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
58
58
|
show(roleId: number, locale: any): Promise<any>;
|
59
59
|
create(data: CreateDTO): Promise<any>;
|
60
60
|
update(roleId: number, data: UpdateDTO): Promise<any>;
|
61
|
-
delete(data: DeleteDTO): Promise<
|
61
|
+
delete(data: DeleteDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
62
62
|
}
|
63
63
|
//# sourceMappingURL=role.controller.d.ts.map
|
@@ -10,54 +10,54 @@ export declare class RoleService {
|
|
10
10
|
private readonly paginationService;
|
11
11
|
private readonly localeService;
|
12
12
|
constructor(prismaService: PrismaService, paginationService: PaginationService, localeService: LocaleService);
|
13
|
-
updateUsers(roleId: number, { ids }: UpdateIdsDTO): Promise<
|
14
|
-
updateScreens(roleId: number, data: UpdateIdsDTO): Promise<
|
15
|
-
updateRoutes(roleId: number, data: UpdateIdsDTO): Promise<
|
16
|
-
updateMenus(roleId: number, data: UpdateIdsDTO): Promise<
|
13
|
+
updateUsers(roleId: number, { ids }: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
14
|
+
updateScreens(roleId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
15
|
+
updateRoutes(roleId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
16
|
+
updateMenus(roleId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
17
17
|
listUsers(roleId: number, paginationParams: PaginationDTO): Promise<{
|
18
|
-
total:
|
18
|
+
total: any;
|
19
19
|
lastPage: number;
|
20
20
|
page: number;
|
21
21
|
pageSize: number;
|
22
22
|
prev: number;
|
23
23
|
next: number;
|
24
|
-
data: any
|
24
|
+
data: any;
|
25
25
|
}>;
|
26
26
|
listMenus(locale: string, roleId: number, paginationParams: PaginationDTO): Promise<{
|
27
|
-
total:
|
27
|
+
total: any;
|
28
28
|
lastPage: number;
|
29
29
|
page: number;
|
30
30
|
pageSize: number;
|
31
31
|
prev: number;
|
32
32
|
next: number;
|
33
|
-
data: any
|
33
|
+
data: any;
|
34
34
|
}>;
|
35
35
|
listRoutes(roleId: number, paginationParams: PaginationDTO): Promise<{
|
36
|
-
total:
|
36
|
+
total: any;
|
37
37
|
lastPage: number;
|
38
38
|
page: number;
|
39
39
|
pageSize: number;
|
40
40
|
prev: number;
|
41
41
|
next: number;
|
42
|
-
data: any
|
42
|
+
data: any;
|
43
43
|
}>;
|
44
44
|
listScreens(locale: string, roleId: number, paginationParams: PaginationDTO): Promise<{
|
45
|
-
total:
|
45
|
+
total: any;
|
46
46
|
lastPage: number;
|
47
47
|
page: number;
|
48
48
|
pageSize: number;
|
49
49
|
prev: number;
|
50
50
|
next: number;
|
51
|
-
data: any
|
51
|
+
data: any;
|
52
52
|
}>;
|
53
53
|
list(locale: string, paginationParams: PaginationDTO): Promise<{
|
54
|
-
total:
|
54
|
+
total: any;
|
55
55
|
lastPage: number;
|
56
56
|
page: number;
|
57
57
|
pageSize: number;
|
58
58
|
prev: number;
|
59
59
|
next: number;
|
60
|
-
data: any
|
60
|
+
data: any;
|
61
61
|
}>;
|
62
62
|
get(locale: string, roleId: number): Promise<any>;
|
63
63
|
create({ slug }: CreateDTO): Promise<any>;
|
@@ -65,6 +65,6 @@ export declare class RoleService {
|
|
65
65
|
id: number;
|
66
66
|
data: UpdateDTO;
|
67
67
|
}): Promise<any>;
|
68
|
-
delete({ ids }: DeleteDTO): Promise<
|
68
|
+
delete({ ids }: DeleteDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
69
69
|
}
|
70
70
|
//# sourceMappingURL=role.service.d.ts.map
|
@@ -8,37 +8,58 @@ export declare class RouteController {
|
|
8
8
|
private readonly routeService;
|
9
9
|
constructor(routeService: RouteService);
|
10
10
|
list(paginationParams: any): Promise<{
|
11
|
-
total:
|
11
|
+
total: any;
|
12
12
|
lastPage: number;
|
13
13
|
page: number;
|
14
14
|
pageSize: number;
|
15
15
|
prev: number;
|
16
16
|
next: number;
|
17
|
-
data: any
|
17
|
+
data: any;
|
18
18
|
}>;
|
19
|
-
get(routeId: number): Promise<
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
get(routeId: number): Promise<{
|
20
|
+
method: import(".prisma/client").$Enums.route_method_enum;
|
21
|
+
id: number;
|
22
|
+
description: string | null;
|
23
|
+
created_at: Date;
|
24
|
+
updated_at: Date;
|
25
|
+
url: string;
|
26
|
+
}>;
|
27
|
+
create({ url, method }: CreateDTO): Promise<{
|
28
|
+
method: import(".prisma/client").$Enums.route_method_enum;
|
29
|
+
id: number;
|
30
|
+
description: string | null;
|
31
|
+
created_at: Date;
|
32
|
+
updated_at: Date;
|
33
|
+
url: string;
|
34
|
+
}>;
|
35
|
+
update(routeId: number, data: UpdateDTO): Promise<{
|
36
|
+
method: import(".prisma/client").$Enums.route_method_enum;
|
37
|
+
id: number;
|
38
|
+
description: string | null;
|
39
|
+
created_at: Date;
|
40
|
+
updated_at: Date;
|
41
|
+
url: string;
|
42
|
+
}>;
|
43
|
+
delete(data: DeleteDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
23
44
|
listRoles(routeId: number, paginationParams: PaginationDTO, locale: any): Promise<{
|
24
|
-
total:
|
45
|
+
total: any;
|
25
46
|
lastPage: number;
|
26
47
|
page: number;
|
27
48
|
pageSize: number;
|
28
49
|
prev: number;
|
29
50
|
next: number;
|
30
|
-
data: any
|
51
|
+
data: any;
|
31
52
|
}>;
|
32
|
-
updateRoles(routeId: number, data: UpdateIdsDTO): Promise<
|
53
|
+
updateRoles(routeId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
33
54
|
listScreens(routeId: number, paginationParams: PaginationDTO, locale: any): Promise<{
|
34
|
-
total:
|
55
|
+
total: any;
|
35
56
|
lastPage: number;
|
36
57
|
page: number;
|
37
58
|
pageSize: number;
|
38
59
|
prev: number;
|
39
60
|
next: number;
|
40
|
-
data: any
|
61
|
+
data: any;
|
41
62
|
}>;
|
42
|
-
updateScreens(routeId: number, data: UpdateIdsDTO): Promise<
|
63
|
+
updateScreens(routeId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
43
64
|
}
|
44
65
|
//# sourceMappingURL=route.controller.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"route.controller.d.ts","sourceRoot":"","sources":["../../src/route/route.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAa/D,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,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,qBAEa,eAAe;IAGxB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAZ,YAAY,EAAE,YAAY;IAIvC,IAAI,CAAe,gBAAgB,KAAA;;;;;;;;;IAKnC,GAAG,CAAiC,OAAO,EAAE,MAAM
|
1
|
+
{"version":3,"file":"route.controller.d.ts","sourceRoot":"","sources":["../../src/route/route.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAa/D,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,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,qBAEa,eAAe;IAGxB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAZ,YAAY,EAAE,YAAY;IAIvC,IAAI,CAAe,gBAAgB,KAAA;;;;;;;;;IAKnC,GAAG,CAAiC,OAAO,EAAE,MAAM;;;;;;;;IAKnD,MAAM,CAAS,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,SAAS;;;;;;;;IAKzC,MAAM,CACsB,OAAO,EAAE,MAAM,EACvC,IAAI,EAAE,SAAS;;;;;;;;IAMnB,MAAM,CAAS,IAAI,EAAE,SAAS;IAK9B,SAAS,CACmB,OAAO,EAAE,MAAM,EACjC,gBAAgB,EAAE,aAAa,EACnC,MAAM,KAAA;;;;;;;;;IAMZ,WAAW,CACiB,OAAO,EAAE,MAAM,EACvC,IAAI,EAAE,YAAY;IAMtB,WAAW,CACiB,OAAO,EAAE,MAAM,EACjC,gBAAgB,EAAE,aAAa,EACnC,MAAM,KAAA;;;;;;;;;IAMZ,aAAa,CACe,OAAO,EAAE,MAAM,EACvC,IAAI,EAAE,YAAY;CAI7B"}
|
@@ -9,40 +9,61 @@ export declare class RouteService {
|
|
9
9
|
private readonly paginationService;
|
10
10
|
constructor(prismaService: PrismaService, paginationService: PaginationService);
|
11
11
|
list(paginationParams: PaginationDTO): Promise<{
|
12
|
-
total:
|
12
|
+
total: any;
|
13
13
|
lastPage: number;
|
14
14
|
page: number;
|
15
15
|
pageSize: number;
|
16
16
|
prev: number;
|
17
17
|
next: number;
|
18
|
-
data: any
|
18
|
+
data: any;
|
19
|
+
}>;
|
20
|
+
get(routeId: number): Promise<{
|
21
|
+
method: import(".prisma/client").$Enums.route_method_enum;
|
22
|
+
id: number;
|
23
|
+
description: string | null;
|
24
|
+
created_at: Date;
|
25
|
+
updated_at: Date;
|
26
|
+
url: string;
|
27
|
+
}>;
|
28
|
+
create({ url, method }: CreateDTO): Promise<{
|
29
|
+
method: import(".prisma/client").$Enums.route_method_enum;
|
30
|
+
id: number;
|
31
|
+
description: string | null;
|
32
|
+
created_at: Date;
|
33
|
+
updated_at: Date;
|
34
|
+
url: string;
|
19
35
|
}>;
|
20
|
-
get(routeId: number): Promise<any>;
|
21
|
-
create({ url, method }: CreateDTO): Promise<any>;
|
22
36
|
update({ id, data }: {
|
23
37
|
id: number;
|
24
38
|
data: UpdateDTO;
|
25
|
-
}): Promise<
|
26
|
-
|
39
|
+
}): Promise<{
|
40
|
+
method: import(".prisma/client").$Enums.route_method_enum;
|
41
|
+
id: number;
|
42
|
+
description: string | null;
|
43
|
+
created_at: Date;
|
44
|
+
updated_at: Date;
|
45
|
+
url: string;
|
46
|
+
}>;
|
47
|
+
delete({ ids }: DeleteDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
27
48
|
listRoles(locale: string, routeId: number, paginationParams: PaginationDTO): Promise<{
|
28
|
-
total:
|
49
|
+
total: any;
|
29
50
|
lastPage: number;
|
30
51
|
page: number;
|
31
52
|
pageSize: number;
|
32
53
|
prev: number;
|
33
54
|
next: number;
|
34
|
-
data: any
|
55
|
+
data: any;
|
35
56
|
}>;
|
36
|
-
updateRoles(routeId: number, data: UpdateIdsDTO): Promise<
|
57
|
+
updateRoles(routeId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
37
58
|
listScreens(locale: string, routeId: number, paginationParams: PaginationDTO): Promise<{
|
38
|
-
total:
|
59
|
+
total: any;
|
39
60
|
lastPage: number;
|
40
61
|
page: number;
|
41
62
|
pageSize: number;
|
42
63
|
prev: number;
|
43
64
|
next: number;
|
44
|
-
data: any
|
65
|
+
data: any;
|
45
66
|
}>;
|
46
|
-
updateScreens(routeId: number, data: UpdateIdsDTO): Promise<
|
67
|
+
updateScreens(routeId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
47
68
|
}
|
48
69
|
//# sourceMappingURL=route.service.d.ts.map
|
@@ -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,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,IAAI,CAAC,gBAAgB,EAAE,aAAa;;;;;;;;;IAmBpC,GAAG,CAAC,OAAO,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,IAAI,CAAC,gBAAgB,EAAE,aAAa;;;;;;;;;IAmBpC,GAAG,CAAC,OAAO,EAAE,MAAM;;;;;;;;IAInB,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"}
|
@@ -7,37 +7,55 @@ export declare class ScreenController {
|
|
7
7
|
private readonly screenService;
|
8
8
|
constructor(screenService: ScreenService);
|
9
9
|
list(paginationParams: any, locale: any): Promise<{
|
10
|
-
total:
|
10
|
+
total: any;
|
11
11
|
lastPage: number;
|
12
12
|
page: number;
|
13
13
|
pageSize: number;
|
14
14
|
prev: number;
|
15
15
|
next: number;
|
16
|
-
data: any
|
16
|
+
data: any;
|
17
17
|
}>;
|
18
18
|
listRoles(screenId: number, paginationParams: any, locale: any): Promise<{
|
19
|
-
total:
|
19
|
+
total: any;
|
20
20
|
lastPage: number;
|
21
21
|
page: number;
|
22
22
|
pageSize: number;
|
23
23
|
prev: number;
|
24
24
|
next: number;
|
25
|
-
data: any
|
25
|
+
data: any;
|
26
26
|
}>;
|
27
27
|
listRoutes(screenId: number, paginationParams: any): Promise<{
|
28
|
-
total:
|
28
|
+
total: any;
|
29
29
|
lastPage: number;
|
30
30
|
page: number;
|
31
31
|
pageSize: number;
|
32
32
|
prev: number;
|
33
33
|
next: number;
|
34
|
-
data: any
|
34
|
+
data: any;
|
35
35
|
}>;
|
36
|
-
updateRoles(screenId: number, data: UpdateIdsDTO): Promise<
|
37
|
-
updateRoutes(screenId: number, data: UpdateIdsDTO): Promise<
|
38
|
-
show(screenId: number): Promise<
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
updateRoles(screenId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
37
|
+
updateRoutes(screenId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
38
|
+
show(screenId: number): Promise<{
|
39
|
+
id: number;
|
40
|
+
created_at: Date;
|
41
|
+
updated_at: Date;
|
42
|
+
slug: string;
|
43
|
+
icon: string | null;
|
44
|
+
}>;
|
45
|
+
create(data: CreateDTO): Promise<{
|
46
|
+
id: number;
|
47
|
+
created_at: Date;
|
48
|
+
updated_at: Date;
|
49
|
+
slug: string;
|
50
|
+
icon: string | null;
|
51
|
+
}>;
|
52
|
+
update(screenId: number, data: UpdateDTO): Promise<{
|
53
|
+
id: number;
|
54
|
+
created_at: Date;
|
55
|
+
updated_at: Date;
|
56
|
+
slug: string;
|
57
|
+
icon: string | null;
|
58
|
+
}>;
|
59
|
+
delete(data: DeleteDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
42
60
|
}
|
43
61
|
//# sourceMappingURL=screen.controller.d.ts.map
|
@@ -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,EA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,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"}
|
@@ -8,41 +8,59 @@ export declare class ScreenService {
|
|
8
8
|
private readonly prismaService;
|
9
9
|
private readonly paginationService;
|
10
10
|
constructor(prismaService: PrismaService, paginationService: PaginationService);
|
11
|
-
updateRoles(screenId: number, data: UpdateIdsDTO): Promise<
|
12
|
-
updateRoutes(screenId: number, { ids }: UpdateIdsDTO): Promise<
|
11
|
+
updateRoles(screenId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
12
|
+
updateRoutes(screenId: number, { ids }: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
13
13
|
listRoutes(screenId: number, paginationParams: PaginationDTO): Promise<{
|
14
|
-
total:
|
14
|
+
total: any;
|
15
15
|
lastPage: number;
|
16
16
|
page: number;
|
17
17
|
pageSize: number;
|
18
18
|
prev: number;
|
19
19
|
next: number;
|
20
|
-
data: any
|
20
|
+
data: any;
|
21
21
|
}>;
|
22
22
|
listRoles(locale: string, screenId: number, paginationParams: PaginationDTO): Promise<{
|
23
|
-
total:
|
23
|
+
total: any;
|
24
24
|
lastPage: number;
|
25
25
|
page: number;
|
26
26
|
pageSize: number;
|
27
27
|
prev: number;
|
28
28
|
next: number;
|
29
|
-
data: any
|
29
|
+
data: any;
|
30
30
|
}>;
|
31
31
|
list(locale: string, paginationParams: PaginationDTO): Promise<{
|
32
|
-
total:
|
32
|
+
total: any;
|
33
33
|
lastPage: number;
|
34
34
|
page: number;
|
35
35
|
pageSize: number;
|
36
36
|
prev: number;
|
37
37
|
next: number;
|
38
|
-
data: any
|
38
|
+
data: any;
|
39
|
+
}>;
|
40
|
+
get(screenId: number): Promise<{
|
41
|
+
id: number;
|
42
|
+
created_at: Date;
|
43
|
+
updated_at: Date;
|
44
|
+
slug: string;
|
45
|
+
icon: string | null;
|
46
|
+
}>;
|
47
|
+
create({ slug, icon }: CreateDTO): Promise<{
|
48
|
+
id: number;
|
49
|
+
created_at: Date;
|
50
|
+
updated_at: Date;
|
51
|
+
slug: string;
|
52
|
+
icon: string | null;
|
39
53
|
}>;
|
40
|
-
get(screenId: number): Promise<any>;
|
41
|
-
create({ slug, icon }: CreateDTO): Promise<any>;
|
42
54
|
update({ id, data }: {
|
43
55
|
id: number;
|
44
56
|
data: UpdateDTO;
|
45
|
-
}): Promise<
|
46
|
-
|
57
|
+
}): Promise<{
|
58
|
+
id: number;
|
59
|
+
created_at: Date;
|
60
|
+
updated_at: Date;
|
61
|
+
slug: string;
|
62
|
+
icon: string | null;
|
63
|
+
}>;
|
64
|
+
delete({ ids }: DeleteDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
47
65
|
}
|
48
66
|
//# sourceMappingURL=screen.service.d.ts.map
|
@@ -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,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,aAAa;IAGtB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ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AAE,gBAAgB,EAAE,aAAa;;;;;;;;;IAoB5D,SAAS,CACb,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,aAAa;;;;;;;;;IAqB3B,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa;;;;;;;;;IAkCpD,GAAG,CAAC,QAAQ,EAAE,MAAM;;;;;;;IAIpB,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,SAAS;;;;;;;IAShC,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"}
|
@@ -7,27 +7,54 @@ export declare class UserController {
|
|
7
7
|
private readonly userService;
|
8
8
|
constructor(userService: UserService);
|
9
9
|
list(paginationParams: any): Promise<{
|
10
|
-
total:
|
10
|
+
total: any;
|
11
11
|
lastPage: number;
|
12
12
|
page: number;
|
13
13
|
pageSize: number;
|
14
14
|
prev: number;
|
15
15
|
next: number;
|
16
|
-
data: any
|
16
|
+
data: any;
|
17
17
|
}>;
|
18
18
|
listRoles(userId: number, paginationParams: any): Promise<{
|
19
|
-
total:
|
19
|
+
total: any;
|
20
20
|
lastPage: number;
|
21
21
|
page: number;
|
22
22
|
pageSize: number;
|
23
23
|
prev: number;
|
24
24
|
next: number;
|
25
|
-
data: any
|
25
|
+
data: any;
|
26
26
|
}>;
|
27
|
-
updateRoles(userId: number, data: UpdateIdsDTO): Promise<
|
28
|
-
get(userId: number): Promise<
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
updateRoles(userId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
28
|
+
get(userId: number): Promise<{
|
29
|
+
code: string | null;
|
30
|
+
name: string;
|
31
|
+
id: number;
|
32
|
+
created_at: Date;
|
33
|
+
updated_at: Date;
|
34
|
+
multifactor_id: number | null;
|
35
|
+
email: string;
|
36
|
+
password: string;
|
37
|
+
}>;
|
38
|
+
create(data: CreateDTO): Promise<{
|
39
|
+
code: string | null;
|
40
|
+
name: string;
|
41
|
+
id: number;
|
42
|
+
created_at: Date;
|
43
|
+
updated_at: Date;
|
44
|
+
multifactor_id: number | null;
|
45
|
+
email: string;
|
46
|
+
password: string;
|
47
|
+
}>;
|
48
|
+
update(userId: number, data: UpdateDTO): Promise<{
|
49
|
+
code: string | null;
|
50
|
+
name: string;
|
51
|
+
id: number;
|
52
|
+
created_at: Date;
|
53
|
+
updated_at: Date;
|
54
|
+
multifactor_id: number | null;
|
55
|
+
email: string;
|
56
|
+
password: string;
|
57
|
+
}>;
|
58
|
+
delete(data: DeleteDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
32
59
|
}
|
33
60
|
//# sourceMappingURL=user.controller.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"user.controller.d.ts","sourceRoot":"","sources":["../../src/user/user.controller.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAEa,cAAc;IAGvB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAIrC,IAAI,CAAe,gBAAgB,KAAA;;;;;;;;;IAKnC,SAAS,CACkB,MAAM,EAAE,MAAM,EAC/B,gBAAgB,KAAA;;;;;;;;;IAM1B,WAAW,CACgB,MAAM,EAAE,MAAM,EACrC,IAAI,EAAE,YAAY;IAMtB,GAAG,CAAgC,MAAM,EAAE,MAAM
|
1
|
+
{"version":3,"file":"user.controller.d.ts","sourceRoot":"","sources":["../../src/user/user.controller.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAEa,cAAc;IAGvB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAIrC,IAAI,CAAe,gBAAgB,KAAA;;;;;;;;;IAKnC,SAAS,CACkB,MAAM,EAAE,MAAM,EAC/B,gBAAgB,KAAA;;;;;;;;;IAM1B,WAAW,CACgB,MAAM,EAAE,MAAM,EACrC,IAAI,EAAE,YAAY;IAMtB,GAAG,CAAgC,MAAM,EAAE,MAAM;;;;;;;;;;IAKvD,MAAM,CAAS,IAAI,EAAE,SAAS;;;;;;;;;;IAKxB,MAAM,CACqB,MAAM,EAAE,MAAM,EACrC,IAAI,EAAE,SAAS;;;;;;;;;;IASnB,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
|
@@ -9,31 +9,58 @@ export declare class UserService {
|
|
9
9
|
private readonly paginationService;
|
10
10
|
constructor(prismaService: PrismaService, paginationService: PaginationService);
|
11
11
|
listRoles(userId: number, paginationParams: PaginationDTO): Promise<{
|
12
|
-
total:
|
12
|
+
total: any;
|
13
13
|
lastPage: number;
|
14
14
|
page: number;
|
15
15
|
pageSize: number;
|
16
16
|
prev: number;
|
17
17
|
next: number;
|
18
|
-
data: any
|
18
|
+
data: any;
|
19
19
|
}>;
|
20
|
-
updateRoles(userId: number, { ids }: UpdateIdsDTO): Promise<
|
20
|
+
updateRoles(userId: number, { ids }: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
21
21
|
list(paginationParams: PaginationDTO): Promise<{
|
22
|
-
total:
|
22
|
+
total: any;
|
23
23
|
lastPage: number;
|
24
24
|
page: number;
|
25
25
|
pageSize: number;
|
26
26
|
prev: number;
|
27
27
|
next: number;
|
28
|
-
data: any
|
28
|
+
data: any;
|
29
|
+
}>;
|
30
|
+
get(userId: number): Promise<{
|
31
|
+
code: string | null;
|
32
|
+
name: string;
|
33
|
+
id: number;
|
34
|
+
created_at: Date;
|
35
|
+
updated_at: Date;
|
36
|
+
multifactor_id: number | null;
|
37
|
+
email: string;
|
38
|
+
password: string;
|
29
39
|
}>;
|
30
|
-
get(userId: number): Promise<any>;
|
31
40
|
hashPassword(password: string): Promise<string>;
|
32
|
-
create({ email, name, password }: CreateDTO): Promise<
|
41
|
+
create({ email, name, password }: CreateDTO): Promise<{
|
42
|
+
code: string | null;
|
43
|
+
name: string;
|
44
|
+
id: number;
|
45
|
+
created_at: Date;
|
46
|
+
updated_at: Date;
|
47
|
+
multifactor_id: number | null;
|
48
|
+
email: string;
|
49
|
+
password: string;
|
50
|
+
}>;
|
33
51
|
update({ id, data }: {
|
34
52
|
id: number;
|
35
53
|
data: UpdateDTO;
|
36
|
-
}): Promise<
|
37
|
-
|
54
|
+
}): Promise<{
|
55
|
+
code: string | null;
|
56
|
+
name: string;
|
57
|
+
id: number;
|
58
|
+
created_at: Date;
|
59
|
+
updated_at: Date;
|
60
|
+
multifactor_id: number | null;
|
61
|
+
email: string;
|
62
|
+
password: string;
|
63
|
+
}>;
|
64
|
+
delete({ ids }: DeleteDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
38
65
|
}
|
39
66
|
//# sourceMappingURL=user.service.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"user.service.d.ts","sourceRoot":"","sources":["../../src/user/user.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,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AAE,gBAAgB,EAAE,aAAa;;;;;;;;;IAoBzD,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,YAAY;IAkBjD,IAAI,CAAC,gBAAgB,EAAE,aAAa;;;;;;;;;IAkBpC,GAAG,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;IAIlB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAK/C,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS;;;;;;;;;;IAY3C,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE;;;;;;;;;;IAOpD,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS;CAoBhC"}
|
package/package.json
CHANGED
@@ -1,43 +1,43 @@
|
|
1
|
-
{
|
2
|
-
"name": "@hedhog/admin",
|
3
|
-
"version": "0.
|
4
|
-
"private": false,
|
5
|
-
"main": "dist/index.js",
|
6
|
-
"scripts": {
|
7
|
-
"clean": "rimraf ./dist",
|
8
|
-
"prebuild": "npm run clean",
|
9
|
-
"build": "tsc --project tsconfig.production.json && npm version patch",
|
10
|
-
"prod": "npm run build && npm publish --access public"
|
11
|
-
},
|
12
|
-
"file": [
|
13
|
-
"dist/**/*",
|
14
|
-
"src/entities/**/*.ts",
|
15
|
-
"src/migrations/**/*.ts",
|
16
|
-
"src/**/*.ejs",
|
17
|
-
"hedhog.yaml"
|
18
|
-
],
|
19
|
-
"keywords": [],
|
20
|
-
"author": "",
|
21
|
-
"license": "MIT",
|
22
|
-
"description": "",
|
23
|
-
"devDependencies": {
|
24
|
-
"@hedhog/locale": "^0.7.
|
25
|
-
"@hedhog/mail": "^0.7.
|
26
|
-
"@hedhog/pagination": "^0.7.
|
27
|
-
"@hedhog/prisma": "^0.7.
|
28
|
-
"@hedhog/setting": "^0.7.
|
29
|
-
"@hedhog/utils": "^0.0.
|
30
|
-
"@nestjs/mapped-types": "^2.0.5",
|
31
|
-
"ts-node": "^10.9.1",
|
32
|
-
"typescript": "^5.1.3"
|
33
|
-
},
|
34
|
-
"peerDependencies": {
|
35
|
-
"@hedhog/locale": "latest",
|
36
|
-
"@hedhog/mail": "latest",
|
37
|
-
"@hedhog/pagination": "latest",
|
38
|
-
"@hedhog/prisma": "latest",
|
39
|
-
"@hedhog/setting": "latest",
|
40
|
-
"@hedhog/utils": "latest",
|
41
|
-
"@nestjs/jwt": "latest"
|
42
|
-
}
|
43
|
-
}
|
1
|
+
{
|
2
|
+
"name": "@hedhog/admin",
|
3
|
+
"version": "0.10.1",
|
4
|
+
"private": false,
|
5
|
+
"main": "dist/index.js",
|
6
|
+
"scripts": {
|
7
|
+
"clean": "rimraf ./dist",
|
8
|
+
"prebuild": "npm run clean",
|
9
|
+
"build": "tsc --project tsconfig.production.json && npm version patch",
|
10
|
+
"prod": "npm run build && npm publish --access public"
|
11
|
+
},
|
12
|
+
"file": [
|
13
|
+
"dist/**/*",
|
14
|
+
"src/entities/**/*.ts",
|
15
|
+
"src/migrations/**/*.ts",
|
16
|
+
"src/**/*.ejs",
|
17
|
+
"hedhog.yaml"
|
18
|
+
],
|
19
|
+
"keywords": [],
|
20
|
+
"author": "",
|
21
|
+
"license": "MIT",
|
22
|
+
"description": "",
|
23
|
+
"devDependencies": {
|
24
|
+
"@hedhog/locale": "^0.7.8",
|
25
|
+
"@hedhog/mail": "^0.7.6",
|
26
|
+
"@hedhog/pagination": "^0.7.4",
|
27
|
+
"@hedhog/prisma": "^0.7.6",
|
28
|
+
"@hedhog/setting": "^0.7.9",
|
29
|
+
"@hedhog/utils": "^0.0.28",
|
30
|
+
"@nestjs/mapped-types": "^2.0.5",
|
31
|
+
"ts-node": "^10.9.1",
|
32
|
+
"typescript": "^5.1.3"
|
33
|
+
},
|
34
|
+
"peerDependencies": {
|
35
|
+
"@hedhog/locale": "latest",
|
36
|
+
"@hedhog/mail": "latest",
|
37
|
+
"@hedhog/pagination": "latest",
|
38
|
+
"@hedhog/prisma": "latest",
|
39
|
+
"@hedhog/setting": "latest",
|
40
|
+
"@hedhog/utils": "latest",
|
41
|
+
"@nestjs/jwt": "latest"
|
42
|
+
}
|
43
|
+
}
|
package/src/admin.module.ts
CHANGED
@@ -8,10 +8,12 @@ import { RoleModule } from './role/role.module';
|
|
8
8
|
import { RouteModule } from './route/route.module';
|
9
9
|
import { ScreenModule } from './screen/screen.module';
|
10
10
|
import { UserModule } from './user/user.module';
|
11
|
+
import { MailModule } from '@hedhog/mail';
|
11
12
|
|
12
13
|
@Module({
|
13
14
|
imports: [
|
14
15
|
forwardRef(() => AuthModule),
|
16
|
+
forwardRef(() => MailModule),
|
15
17
|
forwardRef(() => MenuModule),
|
16
18
|
forwardRef(() => PaginationModule),
|
17
19
|
forwardRef(() => RoleModule),
|
@@ -24,6 +26,7 @@ import { UserModule } from './user/user.module';
|
|
24
26
|
exports: [
|
25
27
|
UserModule,
|
26
28
|
AuthModule,
|
29
|
+
MailModule,
|
27
30
|
RouteModule,
|
28
31
|
RoleModule,
|
29
32
|
MenuModule,
|
package/src/auth/auth.service.ts
CHANGED
@@ -14,6 +14,8 @@ import { LoginDTO } from './dto/login.dto';
|
|
14
14
|
import { OtpDTO } from './dto/otp.dto';
|
15
15
|
import { MultifactorType } from './enums/multifactor-type.enum';
|
16
16
|
import { User } from 'hcode-core';
|
17
|
+
import { SUBJECT_RECOVERY } from './consts/subject';
|
18
|
+
import { getBody } from './consts/body';
|
17
19
|
|
18
20
|
@Injectable()
|
19
21
|
export class AuthService {
|
@@ -24,7 +26,7 @@ export class AuthService {
|
|
24
26
|
private readonly jwt: JwtService,
|
25
27
|
@Inject(forwardRef(() => MailService))
|
26
28
|
private readonly mail: MailService,
|
27
|
-
) {
|
29
|
+
) {}
|
28
30
|
|
29
31
|
async verifyToken(token: string) {
|
30
32
|
return this.jwt.verifyAsync(token, {
|
@@ -145,8 +147,10 @@ export class AuthService {
|
|
145
147
|
|
146
148
|
await this.mail.send({
|
147
149
|
to: email,
|
148
|
-
subject: subject ??
|
149
|
-
body:
|
150
|
+
subject: subject ?? SUBJECT_RECOVERY,
|
151
|
+
body:
|
152
|
+
body ??
|
153
|
+
getBody(`${process.env.FRONTEND_URL}/password-recovery/${code}`),
|
150
154
|
});
|
151
155
|
|
152
156
|
return true;
|
@@ -161,7 +165,6 @@ export class AuthService {
|
|
161
165
|
newPassword: string;
|
162
166
|
confirmNewPassword: string;
|
163
167
|
}) {
|
164
|
-
|
165
168
|
if (newPassword !== confirmNewPassword) {
|
166
169
|
throw new BadRequestException("Passwords don't match");
|
167
170
|
}
|
@@ -176,7 +179,6 @@ export class AuthService {
|
|
176
179
|
});
|
177
180
|
|
178
181
|
if (user) {
|
179
|
-
|
180
182
|
const salt = await genSalt();
|
181
183
|
const password = await hash(confirmNewPassword, salt);
|
182
184
|
|
@@ -186,15 +188,14 @@ export class AuthService {
|
|
186
188
|
},
|
187
189
|
data: {
|
188
190
|
password,
|
191
|
+
code: null,
|
189
192
|
},
|
190
193
|
});
|
191
194
|
|
192
|
-
return
|
193
|
-
|
195
|
+
return this.getToken(user);
|
194
196
|
}
|
195
197
|
|
196
198
|
return false;
|
197
|
-
|
198
199
|
}
|
199
200
|
|
200
201
|
async otp({ token, code }: OtpDTO) {
|
@@ -0,0 +1,26 @@
|
|
1
|
+
export const getBody = (url: string): string => {
|
2
|
+
return `
|
3
|
+
<body style="font-family: Arial, sans-serif; background-color: #eef2f7; color: #333; margin: 0; padding: 0;">
|
4
|
+
<div style="max-width: 600px; margin: 40px auto; background-color: #ffffff; border: 1px solid #dcdfe6; border-radius: 10px; padding: 40px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);">
|
5
|
+
<div style="text-align: center; margin-bottom: 30px;">
|
6
|
+
<h1 style="color: #2c3e50; font-size: 26px; margin: 0;">Recuperação de Senha</h1>
|
7
|
+
</div>
|
8
|
+
<div style="line-height: 1.8; font-size: 16px; color: #555; text-align: justify;">
|
9
|
+
<p>Olá,</p>
|
10
|
+
<p>Recebemos uma solicitação para redefinir sua senha em nossa plataforma. Para garantir que você é o proprietário desta conta, criamos um link exclusivo para redefinir sua senha.</p>
|
11
|
+
<p>Se você não fez essa solicitação, entre em contato conosco imediatamente para garantir a segurança de sua conta.</p>
|
12
|
+
<p>Para redefinir sua senha, clique no botão abaixo:</p>
|
13
|
+
</div>
|
14
|
+
<div style="text-align: center; margin: 30px 0;">
|
15
|
+
<a href="${url}" style="display: inline-block; padding: 15px 30px; background-color: #3498db; color: #ffffff; text-decoration: none; font-size: 16px; font-weight: bold; border-radius: 8px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);">Redefinir Senha</a>
|
16
|
+
</div>
|
17
|
+
<div style="font-size: 14px; line-height: 1.7; color: #666;">
|
18
|
+
<p>Por razões de segurança, evite compartilhar suas informações de login ou clicar em links suspeitos.</p>
|
19
|
+
<p>Agradecemos por escolher nossa plataforma!</p>
|
20
|
+
</div>
|
21
|
+
<div style="text-align: center; font-size: 13px; color: #95a5a6; margin-top: 40px; border-top: 1px solid #ecf0f1; padding-top: 20px;">
|
22
|
+
<p>Este email foi enviado automaticamente. Por favor, não responda.</p>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</body>`;
|
26
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export const SUBJECT_RECOVERY = 'Recuperação de Senha';
|