emilsoftware-utilities 2.0.0-dev.24 → 2.0.0-dev.26

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.
Files changed (112) hide show
  1. package/README.MD +185 -182
  2. package/dist/ContractGenerator.js.map +1 -1
  3. package/dist/DailyFileTransport.js.map +1 -1
  4. package/dist/DatabaseUpdater.js +24 -24
  5. package/dist/DatabaseUpdater.js.map +1 -1
  6. package/dist/EmilsoftwareModule.js.map +1 -1
  7. package/dist/ExecutionTimeLogger.js.map +1 -1
  8. package/dist/Orm.js.map +1 -1
  9. package/dist/RoutesLoggerMiddleware.js.map +1 -1
  10. package/dist/Utilities.js.map +1 -1
  11. package/dist/accessi-module/AccessiModule.js.map +1 -1
  12. package/dist/accessi-module/Console/console.js.map +1 -1
  13. package/dist/accessi-module/Controllers/ConfiguratorController.js.map +1 -1
  14. package/dist/accessi-module/Controllers/FiltriController.js.map +1 -1
  15. package/dist/accessi-module/Controllers/PermissionController.js.map +1 -1
  16. package/dist/accessi-module/Controllers/UserController.js.map +1 -1
  17. package/dist/accessi-module/Dtos/Abilitazione.js.map +1 -1
  18. package/dist/accessi-module/Dtos/AbilitazioneMenu.js.map +1 -1
  19. package/dist/accessi-module/Dtos/AssignPermissionsToUserRequest.js.map +1 -1
  20. package/dist/accessi-module/Dtos/AssignRolesToUserRequest.js.map +1 -1
  21. package/dist/accessi-module/Dtos/BaseResponse.js.map +1 -1
  22. package/dist/accessi-module/Dtos/FiltriUtente.js.map +1 -1
  23. package/dist/accessi-module/Dtos/GetGroupsWithMenusResponse.js.map +1 -1
  24. package/dist/accessi-module/Dtos/GetMenusResponse.js.map +1 -1
  25. package/dist/accessi-module/Dtos/GetRolesResponse.js.map +1 -1
  26. package/dist/accessi-module/Dtos/GetUsersResponse.js.map +1 -1
  27. package/dist/accessi-module/Dtos/LoginRequest.js.map +1 -1
  28. package/dist/accessi-module/Dtos/LoginResponse.js.map +1 -1
  29. package/dist/accessi-module/Dtos/Permission.js.map +1 -1
  30. package/dist/accessi-module/Dtos/RegisterRequest.js.map +1 -1
  31. package/dist/accessi-module/Dtos/Role.js.map +1 -1
  32. package/dist/accessi-module/Dtos/RuoliMenu.js.map +1 -1
  33. package/dist/accessi-module/Dtos/SetStatoRegistrazione.js.map +1 -1
  34. package/dist/accessi-module/Dtos/StatoRegistrazione.js.map +1 -1
  35. package/dist/accessi-module/Dtos/TipoAbilitazione.js.map +1 -1
  36. package/dist/accessi-module/Dtos/TipoFiltro.js.map +1 -1
  37. package/dist/accessi-module/Dtos/TokenResult.js.map +1 -1
  38. package/dist/accessi-module/Dtos/UpdateEnabledStatusRequest.js.map +1 -1
  39. package/dist/accessi-module/Dtos/UserDto.js.map +1 -1
  40. package/dist/accessi-module/Dtos/UserGrantsDto.js.map +1 -1
  41. package/dist/accessi-module/Dtos/index.js.map +1 -1
  42. package/dist/accessi-module/Services/AuthService/AuthService.js.map +1 -1
  43. package/dist/accessi-module/Services/ConfiguratorService/ConfiguratorService.js.map +1 -1
  44. package/dist/accessi-module/Services/EmailService/EmailService.js +11 -11
  45. package/dist/accessi-module/Services/EmailService/EmailService.js.map +1 -1
  46. package/dist/accessi-module/Services/FiltriService/FiltriService.js.map +1 -1
  47. package/dist/accessi-module/Services/PermissionService/PermissionService.js +118 -118
  48. package/dist/accessi-module/Services/PermissionService/PermissionService.js.map +1 -1
  49. package/dist/accessi-module/Services/ServiceTokenService/ServiceTokenService.js +4 -4
  50. package/dist/accessi-module/Services/ServiceTokenService/ServiceTokenService.js.map +1 -1
  51. package/dist/accessi-module/Services/UserService/UserService.js +72 -72
  52. package/dist/accessi-module/Services/UserService/UserService.js.map +1 -1
  53. package/dist/accessi-module/Views/reset-password.html +213 -213
  54. package/dist/accessi-module/database-updates/AccessiDatabaseUpdater.d.ts +5 -0
  55. package/dist/accessi-module/database-updates/AccessiDatabaseUpdater.js +82 -46
  56. package/dist/accessi-module/database-updates/AccessiDatabaseUpdater.js.map +1 -1
  57. package/dist/accessi-module/database-updates/runAccessiDbUpdate.js +9 -1
  58. package/dist/accessi-module/database-updates/runAccessiDbUpdate.js.map +1 -1
  59. package/dist/accessi-module/index.js.map +1 -1
  60. package/dist/accessi-module/jwt/jwt.strategy.js.map +1 -1
  61. package/dist/accessi-module/middleware/accessiRequirements.js.map +1 -1
  62. package/dist/accessi-module/middleware/authenticateGen.js.map +1 -1
  63. package/dist/accessi-module/security/accessControl.js.map +1 -1
  64. package/dist/accessi-module/security/authenticatedToken.js.map +1 -1
  65. package/dist/accessi-module/security/passwordResetToken.js.map +1 -1
  66. package/dist/accessi-module/security/publicAuthRateLimit.js.map +1 -1
  67. package/dist/allegati-module/AllegatiModule.js.map +1 -1
  68. package/dist/allegati-module/Controllers/AllegatiController.js.map +1 -1
  69. package/dist/allegati-module/Dtos/AllegatoDto.js.map +1 -1
  70. package/dist/allegati-module/Dtos/BaseResponse.js.map +1 -1
  71. package/dist/allegati-module/Dtos/UploadSingleFileRequest.js.map +1 -1
  72. package/dist/allegati-module/Dtos/index.js.map +1 -1
  73. package/dist/allegati-module/Dtos/responses/DownloadAllegatoResponseDto.js.map +1 -1
  74. package/dist/allegati-module/Dtos/responses/GetListResponse.js.map +1 -1
  75. package/dist/allegati-module/Dtos/responses/UploadAllegatoResponseDto.js.map +1 -1
  76. package/dist/allegati-module/Services/AllegatiService/AllegatiService.js +49 -49
  77. package/dist/allegati-module/Services/AllegatiService/AllegatiService.js.map +1 -1
  78. package/dist/allegati-module/index.js.map +1 -1
  79. package/dist/autobind.js.map +1 -1
  80. package/dist/emilsoftware-utilities-2.0.0-dev.26.tgz +0 -0
  81. package/dist/firebird-compat.js.map +1 -1
  82. package/dist/index.js.map +1 -1
  83. package/dist/initEmilsoftwareModule.js.map +1 -1
  84. package/dist/swagger/SwaggerConfig.js.map +1 -1
  85. package/package.json +103 -103
  86. package/dist/accessi-module/Console/generated/model/abilitazioneMenuIcona.d.ts +0 -12
  87. package/dist/accessi-module/Console/generated/model/abilitazioneMenuIcona.js +0 -9
  88. package/dist/accessi-module/Console/generated/model/abilitazioneMenuIcona.js.map +0 -1
  89. package/dist/accessi-module/Console/generated/model/abilitazioneMenuNote.d.ts +0 -12
  90. package/dist/accessi-module/Console/generated/model/abilitazioneMenuNote.js +0 -9
  91. package/dist/accessi-module/Console/generated/model/abilitazioneMenuNote.js.map +0 -1
  92. package/dist/accessi-module/Console/generated/model/abilitazioneMenuPagina.d.ts +0 -12
  93. package/dist/accessi-module/Console/generated/model/abilitazioneMenuPagina.js +0 -9
  94. package/dist/accessi-module/Console/generated/model/abilitazioneMenuPagina.js.map +0 -1
  95. package/dist/accessi-module/Console/generated/model/abilitazioneMenuTipo.d.ts +0 -12
  96. package/dist/accessi-module/Console/generated/model/abilitazioneMenuTipo.js +0 -9
  97. package/dist/accessi-module/Console/generated/model/abilitazioneMenuTipo.js.map +0 -1
  98. package/dist/accessi-module/Console/generated/model/publicRegisterRequestCellulare.d.ts +0 -13
  99. package/dist/accessi-module/Console/generated/model/publicRegisterRequestCellulare.js +0 -9
  100. package/dist/accessi-module/Console/generated/model/publicRegisterRequestCellulare.js.map +0 -1
  101. package/dist/accessi-module/Console/generated/model/registerRequestCellulare.d.ts +0 -13
  102. package/dist/accessi-module/Console/generated/model/registerRequestCellulare.js +0 -9
  103. package/dist/accessi-module/Console/generated/model/registerRequestCellulare.js.map +0 -1
  104. package/dist/accessi-module/Console/generated/model/userDtoAvatar.d.ts +0 -13
  105. package/dist/accessi-module/Console/generated/model/userDtoAvatar.js +0 -9
  106. package/dist/accessi-module/Console/generated/model/userDtoAvatar.js.map +0 -1
  107. package/dist/accessi-module/Console/generated/model/userDtoCellulare.d.ts +0 -13
  108. package/dist/accessi-module/Console/generated/model/userDtoCellulare.js +0 -9
  109. package/dist/accessi-module/Console/generated/model/userDtoCellulare.js.map +0 -1
  110. package/dist/accessi-module/Console/openApiClient.d.ts +0 -34
  111. package/dist/accessi-module/Console/openApiClient.js +0 -111
  112. package/dist/accessi-module/Console/openApiClient.js.map +0 -1
@@ -1,213 +1,213 @@
1
- <!DOCTYPE html>
2
- <html lang="it">
3
-
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>Reset Password</title>
8
- <style>
9
- * {
10
- box-sizing: border-box;
11
- margin: 0;
12
- padding: 0;
13
- font-family: Arial, sans-serif;
14
- }
15
-
16
- body {
17
- display: flex;
18
- justify-content: center;
19
- align-items: center;
20
- height: 100vh;
21
- background: linear-gradient(135deg, #0068ae, #004e80, #002c50);
22
- color: #fff;
23
- }
24
-
25
- .container {
26
- background: rgba(255, 255, 255, 0.15);
27
- padding: 25px;
28
- border-radius: 12px;
29
- backdrop-filter: blur(12px);
30
- box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
31
- width: 380px;
32
- text-align: center;
33
- border: 1px solid rgba(255, 255, 255, 0.2);
34
- }
35
-
36
- h1 {
37
- font-size: 24px;
38
- margin-bottom: 15px;
39
- color: #ffffff;
40
- }
41
-
42
- .form-group {
43
- margin: 12px 0;
44
- text-align: left;
45
- }
46
-
47
- label {
48
- font-size: 14px;
49
- font-weight: bold;
50
- display: block;
51
- margin-bottom: 5px;
52
- color: #ffffff;
53
- }
54
-
55
- input {
56
- width: 100%;
57
- padding: 12px;
58
- border: none;
59
- border-radius: 6px;
60
- font-size: 14px;
61
- margin-top: 5px;
62
- background: rgba(255, 255, 255, 0.15);
63
- color: #ffffff;
64
- border: 1px solid rgba(255, 255, 255, 0.3);
65
- }
66
-
67
- input:focus {
68
- outline: none;
69
- border: 2px solid #ffffff;
70
- background: rgba(255, 255, 255, 0.2);
71
- }
72
-
73
- .error {
74
- color: #ff6b6b;
75
- font-size: 12px;
76
- margin-top: 5px;
77
- display: none;
78
- }
79
-
80
- button {
81
- background: linear-gradient(90deg, #0080ff, #0068ae);
82
- border: none;
83
- padding: 12px;
84
- font-size: 16px;
85
- border-radius: 6px;
86
- width: 100%;
87
- color: #ffffff;
88
- cursor: pointer;
89
- font-weight: bold;
90
- transition: all 0.3s ease;
91
- box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.2);
92
- }
93
-
94
- button:hover {
95
- background: linear-gradient(90deg, #0095ff, #0070c0);
96
- transform: scale(1.05);
97
- }
98
- </style>
99
- </head>
100
-
101
- <body>
102
- <div class="container">
103
- <h1>Reimposta la tua password</h1>
104
- <form id="resetForm">
105
- <input type="hidden" id="token" value="">
106
- <input type="hidden" id="returnUrl" value="">
107
- <input type="hidden" id="prefix" value="">
108
-
109
- <div class="form-group">
110
- <label for="password">Nuova Password:</label>
111
- <input type="password" id="password" required>
112
- <p class="error" id="passwordError">La password deve avere almeno 8 caratteri.</p>
113
- </div>
114
-
115
- <div class="form-group">
116
- <label for="confirmPassword">Conferma Password:</label>
117
- <input type="password" id="confirmPassword" required>
118
- <p class="error" id="confirmError">Le password non corrispondono.</p>
119
- </div>
120
-
121
- <button type="submit">Aggiorna password</button>
122
- </form>
123
- </div>
124
-
125
- <script>
126
- document.addEventListener("DOMContentLoaded", function () {
127
- function resolveSafeReturnUrl(rawReturnUrl) {
128
- if (!rawReturnUrl) {
129
- return "/";
130
- }
131
-
132
- if (rawReturnUrl.startsWith("/")) {
133
- return rawReturnUrl;
134
- }
135
-
136
- try {
137
- const parsed = new URL(rawReturnUrl, window.location.origin);
138
- if (parsed.origin === window.location.origin) {
139
- return `${parsed.pathname}${parsed.search}${parsed.hash}`;
140
- }
141
- } catch (error) {}
142
-
143
- return "/";
144
- }
145
-
146
- function resolveSafePrefix(rawPrefix) {
147
- if (!rawPrefix) {
148
- return "";
149
- }
150
-
151
- let normalizedPrefix = rawPrefix.trim();
152
- if (!normalizedPrefix.startsWith("/")) {
153
- normalizedPrefix = "/" + normalizedPrefix;
154
- }
155
-
156
- if (normalizedPrefix.endsWith("/")) {
157
- normalizedPrefix = normalizedPrefix.slice(0, -1);
158
- }
159
-
160
- return /^\/[A-Za-z0-9/_-]*$/.test(normalizedPrefix) ? normalizedPrefix : "";
161
- }
162
-
163
- const urlParams = new URLSearchParams(window.location.search);
164
- const token = window.location.pathname.split("/").pop();
165
- const returnUrl = resolveSafeReturnUrl(urlParams.get("returnUrl"));
166
- const prefix = resolveSafePrefix(urlParams.get("prefix"));
167
-
168
- document.getElementById("token").value = token;
169
- document.getElementById("returnUrl").value = returnUrl;
170
- document.getElementById("prefix").value = prefix;
171
-
172
- document.getElementById("resetForm").addEventListener("submit", async function (event) {
173
- event.preventDefault();
174
- const password = document.getElementById("password").value;
175
- const confirmPassword = document.getElementById("confirmPassword").value;
176
- const passwordError = document.getElementById("passwordError");
177
- const confirmError = document.getElementById("confirmError");
178
-
179
- passwordError.style.display = "none";
180
- confirmError.style.display = "none";
181
-
182
- if (password.length < 8) {
183
- passwordError.style.display = "block";
184
- return;
185
- }
186
-
187
- if (password !== confirmPassword) {
188
- confirmError.style.display = "block";
189
- return;
190
- }
191
-
192
- try {
193
- const response = await fetch(`${prefix}/api/accessi/auth/confirm-reset-password/${token}`, {
194
- method: "POST",
195
- headers: { "Content-Type": "application/json" },
196
- body: JSON.stringify({ newPassword: password })
197
- });
198
-
199
- const data = await response.json();
200
- alert(data.message || "Password aggiornata con successo!");
201
- } catch (error) {
202
- alert("Errore nel reset della password. Riprova piu tardi.");
203
- } finally {
204
- setTimeout(() => {
205
- window.location.href = returnUrl;
206
- }, 500);
207
- }
208
- });
209
- });
210
- </script>
211
- </body>
212
-
213
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="it">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Reset Password</title>
8
+ <style>
9
+ * {
10
+ box-sizing: border-box;
11
+ margin: 0;
12
+ padding: 0;
13
+ font-family: Arial, sans-serif;
14
+ }
15
+
16
+ body {
17
+ display: flex;
18
+ justify-content: center;
19
+ align-items: center;
20
+ height: 100vh;
21
+ background: linear-gradient(135deg, #0068ae, #004e80, #002c50);
22
+ color: #fff;
23
+ }
24
+
25
+ .container {
26
+ background: rgba(255, 255, 255, 0.15);
27
+ padding: 25px;
28
+ border-radius: 12px;
29
+ backdrop-filter: blur(12px);
30
+ box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
31
+ width: 380px;
32
+ text-align: center;
33
+ border: 1px solid rgba(255, 255, 255, 0.2);
34
+ }
35
+
36
+ h1 {
37
+ font-size: 24px;
38
+ margin-bottom: 15px;
39
+ color: #ffffff;
40
+ }
41
+
42
+ .form-group {
43
+ margin: 12px 0;
44
+ text-align: left;
45
+ }
46
+
47
+ label {
48
+ font-size: 14px;
49
+ font-weight: bold;
50
+ display: block;
51
+ margin-bottom: 5px;
52
+ color: #ffffff;
53
+ }
54
+
55
+ input {
56
+ width: 100%;
57
+ padding: 12px;
58
+ border: none;
59
+ border-radius: 6px;
60
+ font-size: 14px;
61
+ margin-top: 5px;
62
+ background: rgba(255, 255, 255, 0.15);
63
+ color: #ffffff;
64
+ border: 1px solid rgba(255, 255, 255, 0.3);
65
+ }
66
+
67
+ input:focus {
68
+ outline: none;
69
+ border: 2px solid #ffffff;
70
+ background: rgba(255, 255, 255, 0.2);
71
+ }
72
+
73
+ .error {
74
+ color: #ff6b6b;
75
+ font-size: 12px;
76
+ margin-top: 5px;
77
+ display: none;
78
+ }
79
+
80
+ button {
81
+ background: linear-gradient(90deg, #0080ff, #0068ae);
82
+ border: none;
83
+ padding: 12px;
84
+ font-size: 16px;
85
+ border-radius: 6px;
86
+ width: 100%;
87
+ color: #ffffff;
88
+ cursor: pointer;
89
+ font-weight: bold;
90
+ transition: all 0.3s ease;
91
+ box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.2);
92
+ }
93
+
94
+ button:hover {
95
+ background: linear-gradient(90deg, #0095ff, #0070c0);
96
+ transform: scale(1.05);
97
+ }
98
+ </style>
99
+ </head>
100
+
101
+ <body>
102
+ <div class="container">
103
+ <h1>Reimposta la tua password</h1>
104
+ <form id="resetForm">
105
+ <input type="hidden" id="token" value="">
106
+ <input type="hidden" id="returnUrl" value="">
107
+ <input type="hidden" id="prefix" value="">
108
+
109
+ <div class="form-group">
110
+ <label for="password">Nuova Password:</label>
111
+ <input type="password" id="password" required>
112
+ <p class="error" id="passwordError">La password deve avere almeno 8 caratteri.</p>
113
+ </div>
114
+
115
+ <div class="form-group">
116
+ <label for="confirmPassword">Conferma Password:</label>
117
+ <input type="password" id="confirmPassword" required>
118
+ <p class="error" id="confirmError">Le password non corrispondono.</p>
119
+ </div>
120
+
121
+ <button type="submit">Aggiorna password</button>
122
+ </form>
123
+ </div>
124
+
125
+ <script>
126
+ document.addEventListener("DOMContentLoaded", function () {
127
+ function resolveSafeReturnUrl(rawReturnUrl) {
128
+ if (!rawReturnUrl) {
129
+ return "/";
130
+ }
131
+
132
+ if (rawReturnUrl.startsWith("/")) {
133
+ return rawReturnUrl;
134
+ }
135
+
136
+ try {
137
+ const parsed = new URL(rawReturnUrl, window.location.origin);
138
+ if (parsed.origin === window.location.origin) {
139
+ return `${parsed.pathname}${parsed.search}${parsed.hash}`;
140
+ }
141
+ } catch (error) {}
142
+
143
+ return "/";
144
+ }
145
+
146
+ function resolveSafePrefix(rawPrefix) {
147
+ if (!rawPrefix) {
148
+ return "";
149
+ }
150
+
151
+ let normalizedPrefix = rawPrefix.trim();
152
+ if (!normalizedPrefix.startsWith("/")) {
153
+ normalizedPrefix = "/" + normalizedPrefix;
154
+ }
155
+
156
+ if (normalizedPrefix.endsWith("/")) {
157
+ normalizedPrefix = normalizedPrefix.slice(0, -1);
158
+ }
159
+
160
+ return /^\/[A-Za-z0-9/_-]*$/.test(normalizedPrefix) ? normalizedPrefix : "";
161
+ }
162
+
163
+ const urlParams = new URLSearchParams(window.location.search);
164
+ const token = window.location.pathname.split("/").pop();
165
+ const returnUrl = resolveSafeReturnUrl(urlParams.get("returnUrl"));
166
+ const prefix = resolveSafePrefix(urlParams.get("prefix"));
167
+
168
+ document.getElementById("token").value = token;
169
+ document.getElementById("returnUrl").value = returnUrl;
170
+ document.getElementById("prefix").value = prefix;
171
+
172
+ document.getElementById("resetForm").addEventListener("submit", async function (event) {
173
+ event.preventDefault();
174
+ const password = document.getElementById("password").value;
175
+ const confirmPassword = document.getElementById("confirmPassword").value;
176
+ const passwordError = document.getElementById("passwordError");
177
+ const confirmError = document.getElementById("confirmError");
178
+
179
+ passwordError.style.display = "none";
180
+ confirmError.style.display = "none";
181
+
182
+ if (password.length < 8) {
183
+ passwordError.style.display = "block";
184
+ return;
185
+ }
186
+
187
+ if (password !== confirmPassword) {
188
+ confirmError.style.display = "block";
189
+ return;
190
+ }
191
+
192
+ try {
193
+ const response = await fetch(`${prefix}/api/accessi/auth/confirm-reset-password/${token}`, {
194
+ method: "POST",
195
+ headers: { "Content-Type": "application/json" },
196
+ body: JSON.stringify({ newPassword: password })
197
+ });
198
+
199
+ const data = await response.json();
200
+ alert(data.message || "Password aggiornata con successo!");
201
+ } catch (error) {
202
+ alert("Errore nel reset della password. Riprova piu tardi.");
203
+ } finally {
204
+ setTimeout(() => {
205
+ window.location.href = returnUrl;
206
+ }, 500);
207
+ }
208
+ });
209
+ });
210
+ </script>
211
+ </body>
212
+
213
+ </html>
@@ -23,7 +23,12 @@ export declare class AccessiDatabaseUpdater extends DatabaseUpdater implements O
23
23
  private static query;
24
24
  private static execute;
25
25
  private static sequenceExists;
26
+ /** Nome deterministico del CHECK che replica NOT NULL su Firebird 2.5 (limite identificatore: 31 caratteri). */
27
+ private static notNullConstraint;
28
+ /** Su Firebird 2.5 NOT NULL sulle colonne esistenti e' replicato da un CHECK: la verifica lo accetta. */
29
+ private static notNullEnforcedByCheck;
26
30
  private static relationIssues;
31
+ private static engineInfo;
27
32
  private static engineIssue;
28
33
  private static columns;
29
34
  private static defaultValue;