emilsoftware-utilities 1.3.97 → 1.3.98
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 +2 -2
- package/dist/accessi-module/Controllers/AccessiController.js +3 -2
- package/dist/accessi-module/Controllers/AuthController.js +15 -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 +12 -2
- package/dist/accessi-module/Controllers/PermissionController.js +169 -16
- package/dist/accessi-module/Controllers/UserController.d.ts +17 -0
- package/dist/accessi-module/Controllers/UserController.js +185 -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/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 +6 -0
- package/dist/accessi-module/Dtos/MenuItem.js +33 -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/RoleWithMenus.d.ts +6 -0
- package/dist/accessi-module/Dtos/RoleWithMenus.js +32 -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 +16 -0
- package/dist/accessi-module/Dtos/User.js +111 -0
- package/dist/accessi-module/Dtos/index.d.ts +14 -0
- package/dist/accessi-module/Dtos/index.js +30 -0
- package/dist/accessi-module/Services/AuthService/AuthService.d.ts +6 -5
- package/dist/accessi-module/Services/AuthService/AuthService.js +23 -19
- 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 +9 -5
- package/dist/accessi-module/Services/PermissionService/PermissionService.js +88 -5
- package/dist/accessi-module/Services/UserService/UserService.d.ts +8 -7
- package/dist/accessi-module/Services/UserService/UserService.js +4 -4
- package/dist/accessi-module/index.d.ts +1 -3
- package/dist/accessi-module/index.js +32 -15
- package/dist/accessi-module/models/QueryResults/MenuAbilitazioniResult.d.ts +1 -1
- package/dist/accessi-module/swagger/SwaggerConfig.js +3 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -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 → Dtos}/StatoRegistrazione.d.ts +0 -0
- /package/dist/accessi-module/{models → Dtos}/StatoRegistrazione.js +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TipoAbilitazione } from "./TipoAbilitazione";
|
|
2
|
+
export declare class AbilitazioneMenu {
|
|
3
|
+
codiceMenu: string;
|
|
4
|
+
tipoAbilitazione: TipoAbilitazione;
|
|
5
|
+
descrizioneMenu: string;
|
|
6
|
+
descrizioneGruppo: string;
|
|
7
|
+
codiceGruppo: string;
|
|
8
|
+
icona: string | null;
|
|
9
|
+
tipo: string | null;
|
|
10
|
+
pagina: string | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
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.AbilitazioneMenu = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const TipoAbilitazione_1 = require("./TipoAbilitazione");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
class AbilitazioneMenu {
|
|
17
|
+
}
|
|
18
|
+
exports.AbilitazioneMenu = AbilitazioneMenu;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, swagger_1.ApiProperty)({
|
|
21
|
+
description: 'Codice univoco del menu',
|
|
22
|
+
example: 'MENU_001'
|
|
23
|
+
}),
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
(0, class_validator_1.IsNotEmpty)({ message: "Il codice menu è obbligatorio." }),
|
|
26
|
+
(0, class_validator_1.Length)(3, 20, { message: "Il codice menu deve essere tra 3 e 20 caratteri." }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], AbilitazioneMenu.prototype, "codiceMenu", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, swagger_1.ApiProperty)({
|
|
31
|
+
description: 'Tipo di abilitazione',
|
|
32
|
+
enum: TipoAbilitazione_1.TipoAbilitazione,
|
|
33
|
+
example: TipoAbilitazione_1.TipoAbilitazione.LETTURA
|
|
34
|
+
}),
|
|
35
|
+
(0, class_validator_1.IsEnum)(TipoAbilitazione_1.TipoAbilitazione, { message: "Il tipo di abilitazione non è valido." }),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], AbilitazioneMenu.prototype, "tipoAbilitazione", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({
|
|
40
|
+
description: 'Descrizione del menu',
|
|
41
|
+
example: 'Gestione utenti'
|
|
42
|
+
}),
|
|
43
|
+
(0, class_validator_1.IsString)(),
|
|
44
|
+
(0, class_validator_1.IsNotEmpty)({ message: "La descrizione del menu è obbligatoria." }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], AbilitazioneMenu.prototype, "descrizioneMenu", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, swagger_1.ApiProperty)({
|
|
49
|
+
description: 'Descrizione del gruppo a cui appartiene il menu',
|
|
50
|
+
example: 'Amministrazione'
|
|
51
|
+
}),
|
|
52
|
+
(0, class_validator_1.IsString)(),
|
|
53
|
+
(0, class_validator_1.IsNotEmpty)({ message: "La descrizione del gruppo è obbligatoria." }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], AbilitazioneMenu.prototype, "descrizioneGruppo", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, swagger_1.ApiProperty)({
|
|
58
|
+
description: 'Codice univoco del gruppo a cui appartiene il menu',
|
|
59
|
+
example: 'GRP_ADMIN'
|
|
60
|
+
}),
|
|
61
|
+
(0, class_validator_1.IsString)(),
|
|
62
|
+
(0, class_validator_1.IsNotEmpty)({ message: "Il codice gruppo è obbligatorio." }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], AbilitazioneMenu.prototype, "codiceGruppo", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
67
|
+
description: 'Nome dell\'icona associata al menu',
|
|
68
|
+
example: 'fa-user'
|
|
69
|
+
}),
|
|
70
|
+
(0, class_validator_1.IsString)(),
|
|
71
|
+
(0, class_validator_1.IsOptional)(),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], AbilitazioneMenu.prototype, "icona", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
76
|
+
description: 'Tipo di menu (es. statico, dinamico, ecc.)',
|
|
77
|
+
example: 'statico'
|
|
78
|
+
}),
|
|
79
|
+
(0, class_validator_1.IsString)(),
|
|
80
|
+
(0, class_validator_1.IsOptional)(),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], AbilitazioneMenu.prototype, "tipo", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
85
|
+
description: 'Percorso della pagina associata al menu',
|
|
86
|
+
example: '/admin/users'
|
|
87
|
+
}),
|
|
88
|
+
(0, class_validator_1.IsString)(),
|
|
89
|
+
(0, class_validator_1.IsOptional)(),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], AbilitazioneMenu.prototype, "pagina", void 0);
|
|
@@ -0,0 +1,28 @@
|
|
|
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.AssignPermissionsToUserRequest = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const Permission_1 = require("./Permission");
|
|
15
|
+
class AssignPermissionsToUserRequest {
|
|
16
|
+
}
|
|
17
|
+
exports.AssignPermissionsToUserRequest = AssignPermissionsToUserRequest;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({
|
|
20
|
+
description: "Lista delle abilitazioni da assegnare all'utente.",
|
|
21
|
+
type: [Permission_1.Permission],
|
|
22
|
+
example: [
|
|
23
|
+
{ codiceMenu: "MNU001", tipoAbilitazione: 30 },
|
|
24
|
+
{ codiceMenu: "MNU002", tipoAbilitazione: 10 }
|
|
25
|
+
]
|
|
26
|
+
}),
|
|
27
|
+
__metadata("design:type", Array)
|
|
28
|
+
], AssignPermissionsToUserRequest.prototype, "permissions", void 0);
|
|
@@ -0,0 +1,24 @@
|
|
|
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.AssignRolesToUserRequest = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
class AssignRolesToUserRequest {
|
|
15
|
+
}
|
|
16
|
+
exports.AssignRolesToUserRequest = AssignRolesToUserRequest;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, swagger_1.ApiProperty)({
|
|
19
|
+
description: "Lista dei codici dei ruoli da assegnare all'utente.",
|
|
20
|
+
type: [String],
|
|
21
|
+
example: ["ADMIN", "EDITOR", "USER"]
|
|
22
|
+
}),
|
|
23
|
+
__metadata("design:type", Array)
|
|
24
|
+
], AssignRolesToUserRequest.prototype, "roles", void 0);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class FiltriUtente {
|
|
2
|
+
progressivo?: number;
|
|
3
|
+
numeroReport?: number;
|
|
4
|
+
indicePersonale?: number;
|
|
5
|
+
codiceClienteSuper?: string | null;
|
|
6
|
+
codiceAgenzia?: string;
|
|
7
|
+
codiceClienteCollegato?: string;
|
|
8
|
+
codiceClienti?: string;
|
|
9
|
+
tipoFiltro?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
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.FiltriUtente = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class FiltriUtente {
|
|
16
|
+
}
|
|
17
|
+
exports.FiltriUtente = FiltriUtente;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({
|
|
20
|
+
description: 'Progressivo identificativo del filtro',
|
|
21
|
+
example: 1
|
|
22
|
+
}),
|
|
23
|
+
(0, class_validator_1.IsInt)({ message: "Il progressivo deve essere un numero intero." }),
|
|
24
|
+
(0, class_validator_1.Min)(1, { message: "Il progressivo deve essere maggiore di 0." }),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], FiltriUtente.prototype, "progressivo", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, swagger_1.ApiProperty)({
|
|
29
|
+
description: 'Numero del report associato',
|
|
30
|
+
example: 1002
|
|
31
|
+
}),
|
|
32
|
+
(0, class_validator_1.IsInt)({ message: "Il numero del report deve essere un numero intero." }),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], FiltriUtente.prototype, "numeroReport", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, swagger_1.ApiProperty)({
|
|
37
|
+
description: 'Indice personale dell\'utente',
|
|
38
|
+
example: 15
|
|
39
|
+
}),
|
|
40
|
+
(0, class_validator_1.IsInt)({ message: "L'indice personale deve essere un numero intero." }),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], FiltriUtente.prototype, "indicePersonale", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
45
|
+
description: 'Codice del cliente principale (super)',
|
|
46
|
+
example: 'CLT_SUP_1234'
|
|
47
|
+
}),
|
|
48
|
+
(0, class_validator_1.IsString)(),
|
|
49
|
+
(0, class_validator_1.IsOptional)(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], FiltriUtente.prototype, "codiceClienteSuper", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
54
|
+
description: 'Codice dell\'agenzia associata',
|
|
55
|
+
example: 'AGZ_5678'
|
|
56
|
+
}),
|
|
57
|
+
(0, class_validator_1.IsString)(),
|
|
58
|
+
(0, class_validator_1.IsOptional)(),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], FiltriUtente.prototype, "codiceAgenzia", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
63
|
+
description: 'Codice del cliente collegato',
|
|
64
|
+
example: 'CLT_COL_8765'
|
|
65
|
+
}),
|
|
66
|
+
(0, class_validator_1.IsString)(),
|
|
67
|
+
(0, class_validator_1.IsOptional)(),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], FiltriUtente.prototype, "codiceClienteCollegato", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
72
|
+
description: 'Lista di codici clienti separati da virgola',
|
|
73
|
+
example: 'CLT_123,CLT_456,CLT_789'
|
|
74
|
+
}),
|
|
75
|
+
(0, class_validator_1.IsString)(),
|
|
76
|
+
(0, class_validator_1.IsOptional)(),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], FiltriUtente.prototype, "codiceClienti", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
81
|
+
description: 'Tipo di filtro applicato',
|
|
82
|
+
example: 'esclusivo'
|
|
83
|
+
}),
|
|
84
|
+
(0, class_validator_1.IsString)(),
|
|
85
|
+
(0, class_validator_1.IsOptional)(),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], FiltriUtente.prototype, "tipoFiltro", 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: 'Username dell\'utente',
|
|
21
|
+
example: 'mario.rossi'
|
|
22
|
+
}),
|
|
23
|
+
(0, class_validator_1.IsString)({ message: "L'username deve essere una stringa." }),
|
|
24
|
+
(0, class_validator_1.Length)(3, 50, { message: "L'username deve essere tra 3 e 50 caratteri." }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], LoginRequest.prototype, "username", 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: 'Username utente' }),
|
|
33
|
+
__metadata("design:type", TokenResult_1.TokenResult)
|
|
34
|
+
], LoginResult.prototype, "token", void 0);
|
|
@@ -0,0 +1,33 @@
|
|
|
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.MenuItem = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const TipoAbilitazione_1 = require("./TipoAbilitazione");
|
|
15
|
+
class MenuItem {
|
|
16
|
+
}
|
|
17
|
+
exports.MenuItem = MenuItem;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({ description: 'Codice univoco del menù' }),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], MenuItem.prototype, "codiceMenu", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, swagger_1.ApiProperty)({ description: 'Descrizione del menù' }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], MenuItem.prototype, "descrizioneMenu", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)({
|
|
28
|
+
description: 'Tipo di abilitazione',
|
|
29
|
+
enum: TipoAbilitazione_1.TipoAbilitazione,
|
|
30
|
+
example: TipoAbilitazione_1.TipoAbilitazione.LETTURA,
|
|
31
|
+
}),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], MenuItem.prototype, "tipoAbilitazione", void 0);
|
|
@@ -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,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.RoleWithMenus = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const MenuItem_1 = require("./MenuItem");
|
|
15
|
+
class RoleWithMenus {
|
|
16
|
+
}
|
|
17
|
+
exports.RoleWithMenus = RoleWithMenus;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Codice univoco del ruolo', required: false }),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], RoleWithMenus.prototype, "codiceRuolo", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, swagger_1.ApiProperty)({ description: 'Descrizione del ruolo' }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], RoleWithMenus.prototype, "descrizioneRuolo", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)({
|
|
28
|
+
description: 'Lista di menù associati al ruolo',
|
|
29
|
+
type: [MenuItem_1.MenuItem]
|
|
30
|
+
}),
|
|
31
|
+
__metadata("design:type", Array)
|
|
32
|
+
], RoleWithMenus.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,16 @@
|
|
|
1
|
+
import { StatoRegistrazione } from "./StatoRegistrazione";
|
|
2
|
+
export declare class User {
|
|
3
|
+
codiceUtente?: string;
|
|
4
|
+
username?: string;
|
|
5
|
+
flagGdpr?: boolean;
|
|
6
|
+
statoRegistrazione?: StatoRegistrazione;
|
|
7
|
+
cognome?: string;
|
|
8
|
+
nome?: string;
|
|
9
|
+
avatar?: string | null;
|
|
10
|
+
flagDueFattori?: boolean;
|
|
11
|
+
codiceLingua?: string;
|
|
12
|
+
cellulare?: string | null;
|
|
13
|
+
flagSuper?: boolean;
|
|
14
|
+
paginaDefault?: string;
|
|
15
|
+
jsonMetadata?: string;
|
|
16
|
+
}
|