emilsoftware-utilities 1.3.97 → 1.3.99
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/AccessiModule.js +2 -1
- package/dist/accessi-module/Controllers/AccessiController.d.ts +3 -4
- package/dist/accessi-module/Controllers/AccessiController.js +4 -23
- package/dist/accessi-module/Controllers/AuthController.d.ts +1 -1
- package/dist/accessi-module/Controllers/AuthController.js +17 -0
- package/dist/accessi-module/Controllers/EmailController.d.ts +1 -1
- package/dist/accessi-module/Controllers/EmailController.js +8 -2
- package/dist/accessi-module/Controllers/PermissionController.d.ts +14 -2
- package/dist/accessi-module/Controllers/PermissionController.js +223 -14
- package/dist/accessi-module/Controllers/UserController.d.ts +17 -0
- package/dist/accessi-module/Controllers/UserController.js +211 -0
- package/dist/accessi-module/Dtos/Abilitazione.d.ts +6 -0
- package/dist/accessi-module/Dtos/Abilitazione.js +47 -0
- package/dist/accessi-module/Dtos/AbilitazioneMenu.d.ts +11 -0
- package/dist/accessi-module/Dtos/AbilitazioneMenu.js +91 -0
- package/dist/accessi-module/Dtos/AssignPermissionsToUserRequest.d.ts +4 -0
- package/dist/accessi-module/Dtos/AssignPermissionsToUserRequest.js +28 -0
- package/dist/accessi-module/Dtos/AssignRolesToUserRequest.d.ts +3 -0
- package/dist/accessi-module/Dtos/AssignRolesToUserRequest.js +24 -0
- package/dist/accessi-module/Dtos/FiltriUtente.d.ts +10 -0
- package/dist/accessi-module/Dtos/FiltriUtente.js +87 -0
- package/dist/accessi-module/Dtos/GetMenusResponse.d.ts +12 -0
- package/dist/accessi-module/Dtos/GetMenusResponse.js +80 -0
- package/dist/accessi-module/{models/QueryResults/UserQueryResult.d.ts → Dtos/GetUsersResponse.d.ts} +2 -2
- package/dist/accessi-module/Dtos/GetUsersResponse.js +252 -0
- package/dist/accessi-module/Dtos/LoginRequest.d.ts +4 -0
- package/dist/accessi-module/Dtos/LoginRequest.js +35 -0
- package/dist/accessi-module/Dtos/LoginResult.d.ts +10 -0
- package/dist/accessi-module/Dtos/LoginResult.js +34 -0
- package/dist/accessi-module/Dtos/MenuItem.d.ts +0 -0
- package/dist/accessi-module/Dtos/MenuItem.js +0 -0
- package/dist/accessi-module/Dtos/Permission.d.ts +4 -0
- package/dist/accessi-module/Dtos/Permission.js +32 -0
- package/dist/accessi-module/Dtos/Role.d.ts +12 -0
- package/dist/accessi-module/Dtos/Role.js +50 -0
- package/dist/accessi-module/Dtos/TipoAbilitazione.d.ts +6 -0
- package/dist/accessi-module/{Services/PermissionService/IPermissionService.js → Dtos/TipoAbilitazione.js} +1 -1
- package/dist/accessi-module/Dtos/TokenResult.d.ts +5 -0
- package/dist/accessi-module/Dtos/TokenResult.js +38 -0
- package/dist/accessi-module/Dtos/User.d.ts +19 -0
- package/dist/accessi-module/Dtos/User.js +118 -0
- package/dist/accessi-module/Dtos/index.d.ts +13 -0
- package/dist/accessi-module/Dtos/index.js +29 -0
- package/dist/accessi-module/Services/AuthService/AuthService.d.ts +6 -5
- package/dist/accessi-module/Services/AuthService/AuthService.js +39 -23
- package/dist/accessi-module/Services/EmailService/EmailService.d.ts +1 -2
- package/dist/accessi-module/Services/EmailService/EmailService.js +1 -1
- package/dist/accessi-module/Services/PermissionService/PermissionService.d.ts +12 -5
- package/dist/accessi-module/Services/PermissionService/PermissionService.js +143 -5
- package/dist/accessi-module/Services/UserService/UserService.d.ts +11 -10
- package/dist/accessi-module/Services/UserService/UserService.js +20 -15
- package/dist/accessi-module/index.d.ts +1 -3
- package/dist/accessi-module/index.js +32 -15
- package/dist/accessi-module/swagger/SwaggerConfig.js +3 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -4
- package/package.json +1 -1
- package/dist/accessi-module/Services/AuthService/IAuthService.d.ts +0 -64
- package/dist/accessi-module/Services/AuthService/IAuthService.js +0 -2
- package/dist/accessi-module/Services/EmailService/IEmailService.d.ts +0 -21
- package/dist/accessi-module/Services/EmailService/IEmailService.js +0 -2
- package/dist/accessi-module/Services/PermissionService/IPermissionService.d.ts +0 -59
- package/dist/accessi-module/Services/UserService/IUserService.d.ts +0 -110
- package/dist/accessi-module/Services/UserService/IUserService.js +0 -2
- package/dist/accessi-module/models/QueryResults/MenuAbilitazioniResult.d.ts +0 -11
- package/dist/accessi-module/models/QueryResults/MenuAbilitazioniResult.js +0 -2
- package/dist/accessi-module/models/QueryResults/UserQueryResult.js +0 -2
- /package/dist/accessi-module/{models → Dtos}/StatoRegistrazione.d.ts +0 -0
- /package/dist/accessi-module/{models → Dtos}/StatoRegistrazione.js +0 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GetUsersResponse = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
class GetUsersResponse {
|
|
15
|
+
}
|
|
16
|
+
exports.GetUsersResponse = GetUsersResponse;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, swagger_1.ApiProperty)({
|
|
19
|
+
description: "Codice identificativo univoco dell'utente.",
|
|
20
|
+
type: String,
|
|
21
|
+
example: "USR123"
|
|
22
|
+
}),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], GetUsersResponse.prototype, "codiceUtente", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, swagger_1.ApiProperty)({
|
|
27
|
+
description: "Email dell'utente.",
|
|
28
|
+
type: String,
|
|
29
|
+
example: "mario.rossi@dev.it"
|
|
30
|
+
}),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], GetUsersResponse.prototype, "email", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, swagger_1.ApiProperty)({
|
|
35
|
+
description: "Flag che indica se l'utente ha accettato il GDPR.",
|
|
36
|
+
type: Boolean,
|
|
37
|
+
example: true,
|
|
38
|
+
required: false
|
|
39
|
+
}),
|
|
40
|
+
__metadata("design:type", Boolean)
|
|
41
|
+
], GetUsersResponse.prototype, "flagGdpr", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, swagger_1.ApiProperty)({
|
|
44
|
+
description: "Data di accettazione del GDPR.",
|
|
45
|
+
type: String,
|
|
46
|
+
format: "date-time",
|
|
47
|
+
example: "2024-03-18T12:34:56Z",
|
|
48
|
+
required: false
|
|
49
|
+
}),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], GetUsersResponse.prototype, "dataGdpr", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, swagger_1.ApiProperty)({
|
|
54
|
+
description: "Data di inserimento dell'utente nel sistema.",
|
|
55
|
+
type: String,
|
|
56
|
+
format: "date-time",
|
|
57
|
+
example: "2023-01-01T08:30:00Z",
|
|
58
|
+
required: false
|
|
59
|
+
}),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], GetUsersResponse.prototype, "dataInserimento", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, swagger_1.ApiProperty)({
|
|
64
|
+
description: "Data di scadenza della password dell'utente.",
|
|
65
|
+
type: String,
|
|
66
|
+
format: "date-time",
|
|
67
|
+
example: "2024-06-30T23:59:59Z",
|
|
68
|
+
required: false
|
|
69
|
+
}),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], GetUsersResponse.prototype, "dataScadenzaPassword", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, swagger_1.ApiProperty)({
|
|
74
|
+
description: "Ultima data di accesso dell'utente.",
|
|
75
|
+
type: String,
|
|
76
|
+
format: "date-time",
|
|
77
|
+
example: "2024-03-15T14:45:00Z",
|
|
78
|
+
required: false
|
|
79
|
+
}),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], GetUsersResponse.prototype, "dataLastLogin", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, swagger_1.ApiProperty)({
|
|
84
|
+
description: "Stato della registrazione dell'utente (es. 1 = attivo, 0 = inattivo).",
|
|
85
|
+
type: Number,
|
|
86
|
+
example: 1,
|
|
87
|
+
required: false
|
|
88
|
+
}),
|
|
89
|
+
__metadata("design:type", Number)
|
|
90
|
+
], GetUsersResponse.prototype, "statoRegistrazione", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, swagger_1.ApiProperty)({
|
|
93
|
+
description: "Chiave di registrazione dell'utente.",
|
|
94
|
+
type: String,
|
|
95
|
+
example: "abc123xyz",
|
|
96
|
+
required: false
|
|
97
|
+
}),
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], GetUsersResponse.prototype, "keyRegistrazione", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, swagger_1.ApiProperty)({
|
|
102
|
+
description: "Cognome dell'utente.",
|
|
103
|
+
type: String,
|
|
104
|
+
example: "Rossi",
|
|
105
|
+
required: false
|
|
106
|
+
}),
|
|
107
|
+
__metadata("design:type", String)
|
|
108
|
+
], GetUsersResponse.prototype, "cognome", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, swagger_1.ApiProperty)({
|
|
111
|
+
description: "Nome dell'utente.",
|
|
112
|
+
type: String,
|
|
113
|
+
example: "Mario",
|
|
114
|
+
required: false
|
|
115
|
+
}),
|
|
116
|
+
__metadata("design:type", String)
|
|
117
|
+
], GetUsersResponse.prototype, "nome", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, swagger_1.ApiProperty)({
|
|
120
|
+
description: "Avatar dell'utente (URL o base64).",
|
|
121
|
+
type: String,
|
|
122
|
+
example: "https://example.com/avatar.jpg",
|
|
123
|
+
required: false
|
|
124
|
+
}),
|
|
125
|
+
__metadata("design:type", String)
|
|
126
|
+
], GetUsersResponse.prototype, "avatar", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, swagger_1.ApiProperty)({
|
|
129
|
+
description: "Flag che indica se l'utente ha attivato l'autenticazione a due fattori.",
|
|
130
|
+
type: Boolean,
|
|
131
|
+
example: true,
|
|
132
|
+
required: false
|
|
133
|
+
}),
|
|
134
|
+
__metadata("design:type", Boolean)
|
|
135
|
+
], GetUsersResponse.prototype, "flagDueFattori", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
(0, swagger_1.ApiProperty)({
|
|
138
|
+
description: "Codice lingua preferito dall'utente.",
|
|
139
|
+
type: String,
|
|
140
|
+
example: "it",
|
|
141
|
+
required: false
|
|
142
|
+
}),
|
|
143
|
+
__metadata("design:type", String)
|
|
144
|
+
], GetUsersResponse.prototype, "codiceLingua", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
(0, swagger_1.ApiProperty)({
|
|
147
|
+
description: "Numero di cellulare dell'utente.",
|
|
148
|
+
type: String,
|
|
149
|
+
example: "+393401234567",
|
|
150
|
+
required: false
|
|
151
|
+
}),
|
|
152
|
+
__metadata("design:type", String)
|
|
153
|
+
], GetUsersResponse.prototype, "cellulare", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
(0, swagger_1.ApiProperty)({
|
|
156
|
+
description: "Flag che indica se l'utente è un super utente.",
|
|
157
|
+
type: Boolean,
|
|
158
|
+
example: false,
|
|
159
|
+
required: false
|
|
160
|
+
}),
|
|
161
|
+
__metadata("design:type", Boolean)
|
|
162
|
+
], GetUsersResponse.prototype, "flagSuper", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, swagger_1.ApiProperty)({
|
|
165
|
+
description: "Pagina di default dell'utente all'accesso.",
|
|
166
|
+
type: String,
|
|
167
|
+
example: "/dashboard",
|
|
168
|
+
required: false
|
|
169
|
+
}),
|
|
170
|
+
__metadata("design:type", String)
|
|
171
|
+
], GetUsersResponse.prototype, "pagDef", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, swagger_1.ApiProperty)({
|
|
174
|
+
description: "Metadata JSON personalizzato dell'utente.",
|
|
175
|
+
type: String,
|
|
176
|
+
example: "{\"theme\": \"dark\", \"notifications\": true}",
|
|
177
|
+
required: false
|
|
178
|
+
}),
|
|
179
|
+
__metadata("design:type", String)
|
|
180
|
+
], GetUsersResponse.prototype, "jsonMetadata", void 0);
|
|
181
|
+
__decorate([
|
|
182
|
+
(0, swagger_1.ApiProperty)({
|
|
183
|
+
description: "Progressivo interno dell'utente.",
|
|
184
|
+
type: Number,
|
|
185
|
+
example: 1001,
|
|
186
|
+
required: false
|
|
187
|
+
}),
|
|
188
|
+
__metadata("design:type", Number)
|
|
189
|
+
], GetUsersResponse.prototype, "prog", void 0);
|
|
190
|
+
__decorate([
|
|
191
|
+
(0, swagger_1.ApiProperty)({
|
|
192
|
+
description: "Numero di report associati all'utente.",
|
|
193
|
+
type: Number,
|
|
194
|
+
example: 5,
|
|
195
|
+
required: false
|
|
196
|
+
}),
|
|
197
|
+
__metadata("design:type", Number)
|
|
198
|
+
], GetUsersResponse.prototype, "numRep", void 0);
|
|
199
|
+
__decorate([
|
|
200
|
+
(0, swagger_1.ApiProperty)({
|
|
201
|
+
description: "Indice personalizzato dell'utente.",
|
|
202
|
+
type: Number,
|
|
203
|
+
example: 200,
|
|
204
|
+
required: false
|
|
205
|
+
}),
|
|
206
|
+
__metadata("design:type", Number)
|
|
207
|
+
], GetUsersResponse.prototype, "idxPers", void 0);
|
|
208
|
+
__decorate([
|
|
209
|
+
(0, swagger_1.ApiProperty)({
|
|
210
|
+
description: "Codice cliente super associato all'utente.",
|
|
211
|
+
type: String,
|
|
212
|
+
example: "CLI001",
|
|
213
|
+
required: false
|
|
214
|
+
}),
|
|
215
|
+
__metadata("design:type", String)
|
|
216
|
+
], GetUsersResponse.prototype, "codiceClienteSuper", void 0);
|
|
217
|
+
__decorate([
|
|
218
|
+
(0, swagger_1.ApiProperty)({
|
|
219
|
+
description: "Codice agente associato all'utente.",
|
|
220
|
+
type: String,
|
|
221
|
+
example: "AGT456",
|
|
222
|
+
required: false
|
|
223
|
+
}),
|
|
224
|
+
__metadata("design:type", String)
|
|
225
|
+
], GetUsersResponse.prototype, "codiceAge", void 0);
|
|
226
|
+
__decorate([
|
|
227
|
+
(0, swagger_1.ApiProperty)({
|
|
228
|
+
description: "Codice cliente collettivo associato all'utente.",
|
|
229
|
+
type: String,
|
|
230
|
+
example: "CLCOL789",
|
|
231
|
+
required: false
|
|
232
|
+
}),
|
|
233
|
+
__metadata("design:type", String)
|
|
234
|
+
], GetUsersResponse.prototype, "codiceClienteCol", void 0);
|
|
235
|
+
__decorate([
|
|
236
|
+
(0, swagger_1.ApiProperty)({
|
|
237
|
+
description: "Codice clienti multipli associati all'utente.",
|
|
238
|
+
type: String,
|
|
239
|
+
example: "CLI001, CLI002",
|
|
240
|
+
required: false
|
|
241
|
+
}),
|
|
242
|
+
__metadata("design:type", String)
|
|
243
|
+
], GetUsersResponse.prototype, "codiceClienti", void 0);
|
|
244
|
+
__decorate([
|
|
245
|
+
(0, swagger_1.ApiProperty)({
|
|
246
|
+
description: "Tipo di filiale a cui appartiene l'utente.",
|
|
247
|
+
type: String,
|
|
248
|
+
example: "HQ",
|
|
249
|
+
required: false
|
|
250
|
+
}),
|
|
251
|
+
__metadata("design:type", String)
|
|
252
|
+
], GetUsersResponse.prototype, "tipoFil", void 0);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LoginRequest = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class LoginRequest {
|
|
16
|
+
}
|
|
17
|
+
exports.LoginRequest = LoginRequest;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({
|
|
20
|
+
description: 'Email dell\'utente',
|
|
21
|
+
example: 'mario.rossi'
|
|
22
|
+
}),
|
|
23
|
+
(0, class_validator_1.IsString)({ message: "L'email deve essere una stringa." }),
|
|
24
|
+
(0, class_validator_1.Length)(3, 50, { message: "L'email deve essere tra 3 e 50 caratteri." }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], LoginRequest.prototype, "email", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, swagger_1.ApiProperty)({
|
|
29
|
+
description: 'Password dell\'utente',
|
|
30
|
+
example: 'Str0ngP@ssw0rd!'
|
|
31
|
+
}),
|
|
32
|
+
(0, class_validator_1.IsString)({ message: "La password deve essere una stringa." }),
|
|
33
|
+
(0, class_validator_1.Length)(8, 100, { message: "La password deve essere tra 8 e 100 caratteri." }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], LoginRequest.prototype, "password", void 0);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { User } from "./User";
|
|
2
|
+
import { FiltriUtente } from "./FiltriUtente";
|
|
3
|
+
import { AbilitazioneMenu } from "./AbilitazioneMenu";
|
|
4
|
+
import { TokenResult } from "./TokenResult";
|
|
5
|
+
export declare class LoginResult {
|
|
6
|
+
utente?: User;
|
|
7
|
+
filtri?: FiltriUtente[];
|
|
8
|
+
abilitazioni?: AbilitazioneMenu[];
|
|
9
|
+
token?: TokenResult;
|
|
10
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LoginResult = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const User_1 = require("./User");
|
|
15
|
+
const TokenResult_1 = require("./TokenResult");
|
|
16
|
+
class LoginResult {
|
|
17
|
+
}
|
|
18
|
+
exports.LoginResult = LoginResult;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, swagger_1.ApiProperty)({ description: 'Dati utente' }),
|
|
21
|
+
__metadata("design:type", User_1.User)
|
|
22
|
+
], LoginResult.prototype, "utente", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, swagger_1.ApiProperty)({ description: 'Filtri utente' }),
|
|
25
|
+
__metadata("design:type", Array)
|
|
26
|
+
], LoginResult.prototype, "filtri", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, swagger_1.ApiProperty)({ description: 'Abilitazioni utente' }),
|
|
29
|
+
__metadata("design:type", Array)
|
|
30
|
+
], LoginResult.prototype, "abilitazioni", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({ description: 'Token' }),
|
|
33
|
+
__metadata("design:type", TokenResult_1.TokenResult)
|
|
34
|
+
], LoginResult.prototype, "token", void 0);
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Permission = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
class Permission {
|
|
15
|
+
}
|
|
16
|
+
exports.Permission = Permission;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, swagger_1.ApiProperty)({
|
|
19
|
+
description: "Codice identificativo del menu a cui assegnare l'abilitazione.",
|
|
20
|
+
type: String,
|
|
21
|
+
example: "MNU001"
|
|
22
|
+
}),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], Permission.prototype, "codiceMenu", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, swagger_1.ApiProperty)({
|
|
27
|
+
description: "Tipo di abilitazione assegnata all'utente per il menu specificato.",
|
|
28
|
+
type: Number,
|
|
29
|
+
example: 30
|
|
30
|
+
}),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], Permission.prototype, "tipoAbilitazione", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TipoAbilitazione } from './TipoAbilitazione';
|
|
2
|
+
declare class Menu {
|
|
3
|
+
codiceMenu: string;
|
|
4
|
+
descrizioneMenu: string;
|
|
5
|
+
tipoAbilitazione: TipoAbilitazione;
|
|
6
|
+
}
|
|
7
|
+
export declare class Role {
|
|
8
|
+
codiceRuolo?: string;
|
|
9
|
+
descrizioneRuolo: string;
|
|
10
|
+
menu: Menu[];
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Role = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const TipoAbilitazione_1 = require("./TipoAbilitazione");
|
|
15
|
+
class Menu {
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, swagger_1.ApiProperty)({ description: 'Codice univoco del menù' }),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], Menu.prototype, "codiceMenu", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, swagger_1.ApiProperty)({ description: 'Descrizione del menù' }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], Menu.prototype, "descrizioneMenu", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, swagger_1.ApiProperty)({
|
|
27
|
+
description: 'Tipo di abilitazione',
|
|
28
|
+
enum: TipoAbilitazione_1.TipoAbilitazione,
|
|
29
|
+
example: TipoAbilitazione_1.TipoAbilitazione.LETTURA,
|
|
30
|
+
}),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], Menu.prototype, "tipoAbilitazione", void 0);
|
|
33
|
+
class Role {
|
|
34
|
+
}
|
|
35
|
+
exports.Role = Role;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Codice univoco del ruolo', required: false }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], Role.prototype, "codiceRuolo", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, swagger_1.ApiProperty)({ description: 'Descrizione del ruolo' }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Role.prototype, "descrizioneRuolo", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, swagger_1.ApiProperty)({
|
|
46
|
+
description: 'Lista di menù associati al ruolo',
|
|
47
|
+
type: [Menu]
|
|
48
|
+
}),
|
|
49
|
+
__metadata("design:type", Array)
|
|
50
|
+
], Role.prototype, "menu", void 0);
|
|
@@ -6,5 +6,5 @@ var TipoAbilitazione;
|
|
|
6
6
|
TipoAbilitazione[TipoAbilitazione["NESSUNA"] = 0] = "NESSUNA";
|
|
7
7
|
TipoAbilitazione[TipoAbilitazione["LETTURA"] = 10] = "LETTURA";
|
|
8
8
|
TipoAbilitazione[TipoAbilitazione["SCRITTURA"] = 20] = "SCRITTURA";
|
|
9
|
-
|
|
9
|
+
TipoAbilitazione[TipoAbilitazione["SPECIAL"] = 30] = "SPECIAL";
|
|
10
10
|
})(TipoAbilitazione || (exports.TipoAbilitazione = TipoAbilitazione = {}));
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TokenResult = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
class TokenResult {
|
|
15
|
+
}
|
|
16
|
+
exports.TokenResult = TokenResult;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, swagger_1.ApiProperty)({
|
|
19
|
+
description: "Tempo di scadenza del token in secondi",
|
|
20
|
+
example: "3600"
|
|
21
|
+
}),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], TokenResult.prototype, "expiresIn", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, swagger_1.ApiProperty)({
|
|
26
|
+
description: "Valore del token JWT o Basic",
|
|
27
|
+
example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
|
28
|
+
}),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], TokenResult.prototype, "value", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({
|
|
33
|
+
description: "Tipo di token di autenticazione",
|
|
34
|
+
enum: ["Bearer", "Basic"],
|
|
35
|
+
example: "Bearer"
|
|
36
|
+
}),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], TokenResult.prototype, "type", void 0);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StatoRegistrazione } from "./StatoRegistrazione";
|
|
2
|
+
export declare class User {
|
|
3
|
+
codiceUtente?: string;
|
|
4
|
+
email?: string;
|
|
5
|
+
flagGdpr?: boolean;
|
|
6
|
+
statoRegistrazione?: StatoRegistrazione;
|
|
7
|
+
cognome?: string;
|
|
8
|
+
nome?: string;
|
|
9
|
+
avatar?: string | null;
|
|
10
|
+
flagDueFattori?: boolean;
|
|
11
|
+
codiceLingua?: string;
|
|
12
|
+
dataScadenzaPassword?: string;
|
|
13
|
+
cellulare?: string | null;
|
|
14
|
+
flagSuper?: boolean;
|
|
15
|
+
paginaDefault?: string;
|
|
16
|
+
jsonMetadata?: string;
|
|
17
|
+
roles: any[];
|
|
18
|
+
permissions: any[];
|
|
19
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.User = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const StatoRegistrazione_1 = require("./StatoRegistrazione");
|
|
15
|
+
class User {
|
|
16
|
+
}
|
|
17
|
+
exports.User = User;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
20
|
+
description: "Codice identificativo dell'utente",
|
|
21
|
+
example: "USR12345"
|
|
22
|
+
}),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], User.prototype, "codiceUtente", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
27
|
+
description: "Email per l'autenticazione",
|
|
28
|
+
example: "m.rossi@dev.it"
|
|
29
|
+
}),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], User.prototype, "email", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
34
|
+
description: "Flag per l'accettazione del GDPR",
|
|
35
|
+
example: true
|
|
36
|
+
}),
|
|
37
|
+
__metadata("design:type", Boolean)
|
|
38
|
+
], User.prototype, "flagGdpr", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
41
|
+
description: "Stato della registrazione dell'utente",
|
|
42
|
+
enum: StatoRegistrazione_1.StatoRegistrazione,
|
|
43
|
+
example: StatoRegistrazione_1.StatoRegistrazione.CONF
|
|
44
|
+
}),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], User.prototype, "statoRegistrazione", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
49
|
+
description: "Cognome dell'utente",
|
|
50
|
+
example: "Rossi"
|
|
51
|
+
}),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], User.prototype, "cognome", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
56
|
+
description: "Nome dell'utente",
|
|
57
|
+
example: "Mario"
|
|
58
|
+
}),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], User.prototype, "nome", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
63
|
+
description: "URL dell'avatar dell'utente",
|
|
64
|
+
example: "https://example.com/avatar.jpg",
|
|
65
|
+
nullable: true
|
|
66
|
+
}),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], User.prototype, "avatar", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
71
|
+
description: "Indica se l'autenticazione a due fattori è attivata",
|
|
72
|
+
example: true
|
|
73
|
+
}),
|
|
74
|
+
__metadata("design:type", Boolean)
|
|
75
|
+
], User.prototype, "flagDueFattori", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
78
|
+
description: "Codice lingua preferito dall'utente",
|
|
79
|
+
example: "it"
|
|
80
|
+
}),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], User.prototype, "codiceLingua", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
85
|
+
description: "Data scadenza password",
|
|
86
|
+
example: "2025-06-01"
|
|
87
|
+
}),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], User.prototype, "dataScadenzaPassword", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
92
|
+
description: "Numero di cellulare dell'utente",
|
|
93
|
+
example: "+393331234567",
|
|
94
|
+
nullable: true
|
|
95
|
+
}),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], User.prototype, "cellulare", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
100
|
+
description: "Indica se l'utente ha privilegi di superutente",
|
|
101
|
+
example: false
|
|
102
|
+
}),
|
|
103
|
+
__metadata("design:type", Boolean)
|
|
104
|
+
], User.prototype, "flagSuper", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
107
|
+
description: "Pagina di default visualizzata dall'utente dopo il login",
|
|
108
|
+
example: "/dashboard"
|
|
109
|
+
}),
|
|
110
|
+
__metadata("design:type", String)
|
|
111
|
+
], User.prototype, "paginaDefault", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
114
|
+
description: "Metadati non relazionali dell'utente",
|
|
115
|
+
example: "{ \"key\": \"value\" }",
|
|
116
|
+
}),
|
|
117
|
+
__metadata("design:type", String)
|
|
118
|
+
], User.prototype, "jsonMetadata", void 0);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./Abilitazione";
|
|
2
|
+
export * from "./AbilitazioneMenu";
|
|
3
|
+
export * from "./AssignPermissionsToUserRequest";
|
|
4
|
+
export * from "./AssignRolesToUserRequest";
|
|
5
|
+
export * from "./FiltriUtente";
|
|
6
|
+
export * from "./LoginRequest";
|
|
7
|
+
export * from "./LoginResult";
|
|
8
|
+
export * from "./Permission";
|
|
9
|
+
export * from "./Role";
|
|
10
|
+
export * from "./StatoRegistrazione";
|
|
11
|
+
export * from "./TipoAbilitazione";
|
|
12
|
+
export * from "./TokenResult";
|
|
13
|
+
export * from "./User";
|