emilsoftware-utilities 1.4.0-dev.7 → 1.4.0-dev.8
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/accessi-module/Controllers/UserController.js +1 -1
- package/dist/accessi-module/Dtos/RegisterRequest.d.ts +3 -1
- package/dist/accessi-module/Dtos/RegisterRequest.js +85 -16
- package/dist/accessi-module/Services/EmailService/EmailService.js +1 -0
- package/dist/emilsoftware-utilities-1.4.0-dev.8.tgz +0 -0
- package/package.json +1 -1
- package/dist/emilsoftware-utilities-1.4.0-dev.7.tgz +0 -0
|
@@ -77,7 +77,7 @@ let UserController = UserController_1 = class UserController {
|
|
|
77
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
78
78
|
try {
|
|
79
79
|
const codiceUtente = yield this.userService.register(registrationData);
|
|
80
|
-
yield this.emailService.sendPasswordResetEmail(registrationData.email);
|
|
80
|
+
yield this.emailService.sendPasswordResetEmail(registrationData.email, registrationData.resetUrlCustom, registrationData.htmlMail);
|
|
81
81
|
return Utilities_1.RestUtilities.sendBaseResponse(res, codiceUtente);
|
|
82
82
|
}
|
|
83
83
|
catch (error) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Permission } from
|
|
1
|
+
import { Permission } from "./Permission";
|
|
2
2
|
export declare class RegisterRequest {
|
|
3
3
|
email: string;
|
|
4
4
|
cognome?: string;
|
|
@@ -18,4 +18,6 @@ export declare class RegisterRequest {
|
|
|
18
18
|
flagDueFattori?: boolean;
|
|
19
19
|
paginaDefault?: string;
|
|
20
20
|
ragSocCli?: string;
|
|
21
|
+
resetUrlCustom?: string;
|
|
22
|
+
htmlMail?: string;
|
|
21
23
|
}
|
|
@@ -17,11 +17,17 @@ class RegisterRequest {
|
|
|
17
17
|
}
|
|
18
18
|
exports.RegisterRequest = RegisterRequest;
|
|
19
19
|
__decorate([
|
|
20
|
-
(0, swagger_1.ApiProperty)({
|
|
20
|
+
(0, swagger_1.ApiProperty)({
|
|
21
|
+
description: "Email dell'utente.",
|
|
22
|
+
example: "mario.rossi@dev.it",
|
|
23
|
+
}),
|
|
21
24
|
__metadata("design:type", String)
|
|
22
25
|
], RegisterRequest.prototype, "email", void 0);
|
|
23
26
|
__decorate([
|
|
24
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
27
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
28
|
+
description: "Cognome dell'utente.",
|
|
29
|
+
example: "Rossi",
|
|
30
|
+
}),
|
|
25
31
|
__metadata("design:type", String)
|
|
26
32
|
], RegisterRequest.prototype, "cognome", void 0);
|
|
27
33
|
__decorate([
|
|
@@ -29,7 +35,11 @@ __decorate([
|
|
|
29
35
|
__metadata("design:type", String)
|
|
30
36
|
], RegisterRequest.prototype, "nome", void 0);
|
|
31
37
|
__decorate([
|
|
32
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
38
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
39
|
+
description: "Numero di cellulare.",
|
|
40
|
+
example: "+393401234567",
|
|
41
|
+
nullable: true,
|
|
42
|
+
}),
|
|
33
43
|
__metadata("design:type", String)
|
|
34
44
|
], RegisterRequest.prototype, "cellulare", void 0);
|
|
35
45
|
__decorate([
|
|
@@ -37,54 +47,113 @@ __decorate([
|
|
|
37
47
|
__metadata("design:type", Boolean)
|
|
38
48
|
], RegisterRequest.prototype, "flagSuper", void 0);
|
|
39
49
|
__decorate([
|
|
40
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
50
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
51
|
+
description: "Ruoli assegnati all'utente.",
|
|
52
|
+
example: ["admin", "editor"],
|
|
53
|
+
}),
|
|
41
54
|
__metadata("design:type", Array)
|
|
42
55
|
], RegisterRequest.prototype, "roles", void 0);
|
|
43
56
|
__decorate([
|
|
44
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
57
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
58
|
+
description: "Permessi assegnati all'utente.",
|
|
59
|
+
type: [Permission_1.Permission],
|
|
60
|
+
example: [
|
|
61
|
+
{
|
|
62
|
+
codiceMenu: "MNUOFFICINA",
|
|
63
|
+
tipoAbilitazione: TipoAbilitazione_1.TipoAbilitazione.SCRITTURA,
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
}),
|
|
45
67
|
__metadata("design:type", Array)
|
|
46
68
|
], RegisterRequest.prototype, "permissions", void 0);
|
|
47
69
|
__decorate([
|
|
48
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
70
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
71
|
+
description: "Numero del report associato.",
|
|
72
|
+
example: 1002,
|
|
73
|
+
}),
|
|
49
74
|
__metadata("design:type", Number)
|
|
50
75
|
], RegisterRequest.prototype, "numeroReport", void 0);
|
|
51
76
|
__decorate([
|
|
52
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
77
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
78
|
+
description: "Indice personale dell'utente.",
|
|
79
|
+
example: 15,
|
|
80
|
+
}),
|
|
53
81
|
__metadata("design:type", Number)
|
|
54
82
|
], RegisterRequest.prototype, "indicePersonale", void 0);
|
|
55
83
|
__decorate([
|
|
56
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
84
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
85
|
+
description: "Codice del cliente principale (super).",
|
|
86
|
+
example: "CLT_SUP_1234",
|
|
87
|
+
}),
|
|
57
88
|
__metadata("design:type", String)
|
|
58
89
|
], RegisterRequest.prototype, "codiceClienteSuper", void 0);
|
|
59
90
|
__decorate([
|
|
60
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
91
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
92
|
+
description: "Codice dell'agenzia associata.",
|
|
93
|
+
example: "AGZ_5678",
|
|
94
|
+
}),
|
|
61
95
|
__metadata("design:type", String)
|
|
62
96
|
], RegisterRequest.prototype, "codiceAgenzia", void 0);
|
|
63
97
|
__decorate([
|
|
64
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
98
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
99
|
+
description: "Codice del cliente collegato.",
|
|
100
|
+
example: "CLT_COL_8765",
|
|
101
|
+
}),
|
|
65
102
|
__metadata("design:type", String)
|
|
66
103
|
], RegisterRequest.prototype, "codiceClienteCollegato", void 0);
|
|
67
104
|
__decorate([
|
|
68
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
105
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
106
|
+
description: "Lista di codici clienti separati da virgola.",
|
|
107
|
+
example: "CLT_123,CLT_456,CLT_789",
|
|
108
|
+
}),
|
|
69
109
|
__metadata("design:type", String)
|
|
70
110
|
], RegisterRequest.prototype, "codiceClienti", void 0);
|
|
71
111
|
__decorate([
|
|
72
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
112
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
113
|
+
description: "Tipo di filtro applicato.",
|
|
114
|
+
example: "esclusivo",
|
|
115
|
+
}),
|
|
73
116
|
__metadata("design:type", String)
|
|
74
117
|
], RegisterRequest.prototype, "tipoFiltro", void 0);
|
|
75
118
|
__decorate([
|
|
76
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
119
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
120
|
+
description: "Avatar dell'utente.",
|
|
121
|
+
example: "user.svg",
|
|
122
|
+
}),
|
|
77
123
|
__metadata("design:type", String)
|
|
78
124
|
], RegisterRequest.prototype, "avatar", void 0);
|
|
79
125
|
__decorate([
|
|
80
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
126
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
127
|
+
description: "Flag autenticazione a due fattori.",
|
|
128
|
+
example: false,
|
|
129
|
+
}),
|
|
81
130
|
__metadata("design:type", Boolean)
|
|
82
131
|
], RegisterRequest.prototype, "flagDueFattori", void 0);
|
|
83
132
|
__decorate([
|
|
84
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
133
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
134
|
+
description: "Pagina di default dell'utente.",
|
|
135
|
+
example: "/dashboard",
|
|
136
|
+
}),
|
|
85
137
|
__metadata("design:type", String)
|
|
86
138
|
], RegisterRequest.prototype, "paginaDefault", void 0);
|
|
87
139
|
__decorate([
|
|
88
|
-
(0, swagger_1.ApiPropertyOptional)({
|
|
140
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
141
|
+
description: "Ragione sociale cliente.",
|
|
142
|
+
example: "ALIVAL STOCK",
|
|
143
|
+
}),
|
|
89
144
|
__metadata("design:type", String)
|
|
90
145
|
], RegisterRequest.prototype, "ragSocCli", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
148
|
+
description: "Link a una pagina di reset personalizzata",
|
|
149
|
+
example: "http://www.mio-progetto.it/reset-password",
|
|
150
|
+
}),
|
|
151
|
+
__metadata("design:type", String)
|
|
152
|
+
], RegisterRequest.prototype, "resetUrlCustom", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
155
|
+
description: "HTML mail personalizzato",
|
|
156
|
+
example: "<html></html>",
|
|
157
|
+
}),
|
|
158
|
+
__metadata("design:type", String)
|
|
159
|
+
], RegisterRequest.prototype, "htmlMail", void 0);
|
|
@@ -53,6 +53,7 @@ let EmailService = class EmailService {
|
|
|
53
53
|
resetUrl = resetUrlCustom + "?token=" + resetToken;
|
|
54
54
|
}
|
|
55
55
|
let sPhrase;
|
|
56
|
+
console.log('reset_url', resetUrlCustom);
|
|
56
57
|
if (htmlMail) {
|
|
57
58
|
sPhrase = htmlMail;
|
|
58
59
|
sPhrase.replace('#link_conferma_password_url', resetUrl);
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|