adamo-types 1.1.128 → 1.1.129
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/constants/admin.constants.d.ts +4 -9
- package/dist/admin/constants/admin.constants.js +7 -13
- package/dist/admin/user/create/index.d.ts +0 -1
- package/dist/admin/user/create/index.js +0 -1
- package/dist/admin/user/create/internal/creation-process.d.ts +21 -22
- package/dist/admin/user/create/internal/creation-process.js +21 -3
- package/dist/admin/user/create/req/create.entity.d.ts +49 -12
- package/dist/admin/user/create/req/create.entity.js +182 -24
- package/dist/bss/bearingpoint/auth.entity.d.ts +21 -0
- package/dist/bss/bearingpoint/auth.entity.js +19 -1
- package/dist/bss/bearingpoint/lookup/option.entity.d.ts +2 -2
- package/dist/bss/bearingpoint/lookup/option.entity.js +1 -1
- package/dist/bss/bearingpoint/search/search.entity.d.ts +3 -0
- package/dist/bss/bearingpoint/search/search.entity.js +7 -1
- package/dist/bss/constants/bp.constants.d.ts +4 -0
- package/dist/bss/constants/bp.constants.js +6 -1
- package/dist/common/constants/common.constants.d.ts +7 -52
- package/dist/common/constants/common.constants.js +9 -54
- package/dist/common/constants/error.constants.d.ts +8 -0
- package/dist/common/constants/error.constants.js +9 -1
- package/dist/common/constants/index.d.ts +0 -1
- package/dist/common/constants/index.js +0 -1
- package/dist/common/edge-bss/user/req/user.entity.d.ts +10 -14
- package/dist/common/edge-bss/user/req/user.entity.js +12 -18
- package/dist/common/exception/exception.entity.d.ts +1 -0
- package/dist/common/exception/exception.entity.js +2 -1
- package/dist/common/user/auth/user.auth.entity.d.ts +3 -2
- package/dist/database/auth.entity.d.ts +41 -0
- package/dist/database/auth.entity.js +190 -0
- package/dist/database/index.d.ts +1 -0
- package/dist/database/index.js +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/admin/user/create/internal/constants.d.ts +0 -8
- package/dist/admin/user/create/internal/constants.js +0 -11
- package/dist/common/constants/jwt-decoded.entity.d.ts +0 -10
- package/dist/common/constants/jwt-decoded.entity.js +0 -10
|
@@ -6,15 +6,10 @@ export declare enum Language {
|
|
|
6
6
|
export declare enum Role {
|
|
7
7
|
ADMIN = "admin",
|
|
8
8
|
MANAGER = "manager",
|
|
9
|
-
|
|
10
|
-
OPERATOR = "operator",
|
|
11
|
-
COVERAGE = "coverage"
|
|
9
|
+
OPERATOR = "operator"
|
|
12
10
|
}
|
|
13
|
-
export declare enum
|
|
14
|
-
INDIVIDUAL = "Individual"
|
|
15
|
-
}
|
|
16
|
-
export declare enum InfonovaAction {
|
|
11
|
+
export declare enum AdminCreateUserActionTypes {
|
|
17
12
|
CREATE = "C",
|
|
18
|
-
|
|
19
|
-
NO_ACTION = "
|
|
13
|
+
DELETE = "D",
|
|
14
|
+
NO_ACTION = ""
|
|
20
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.AdminCreateUserActionTypes = exports.Role = exports.Language = void 0;
|
|
4
4
|
var Language;
|
|
5
5
|
(function (Language) {
|
|
6
6
|
Language["ENGLISH"] = "en";
|
|
@@ -11,17 +11,11 @@ var Role;
|
|
|
11
11
|
(function (Role) {
|
|
12
12
|
Role["ADMIN"] = "admin";
|
|
13
13
|
Role["MANAGER"] = "manager";
|
|
14
|
-
Role["MANAGER_ADMIN"] = "manager_admin";
|
|
15
14
|
Role["OPERATOR"] = "operator";
|
|
16
|
-
Role["COVERAGE"] = "coverage";
|
|
17
15
|
})(Role = exports.Role || (exports.Role = {}));
|
|
18
|
-
var
|
|
19
|
-
(function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
(
|
|
24
|
-
InfonovaAction["CREATE"] = "C";
|
|
25
|
-
InfonovaAction["DEACTIVATE"] = "D";
|
|
26
|
-
InfonovaAction["NO_ACTION"] = "N";
|
|
27
|
-
})(InfonovaAction = exports.InfonovaAction || (exports.InfonovaAction = {}));
|
|
16
|
+
var AdminCreateUserActionTypes;
|
|
17
|
+
(function (AdminCreateUserActionTypes) {
|
|
18
|
+
AdminCreateUserActionTypes["CREATE"] = "C";
|
|
19
|
+
AdminCreateUserActionTypes["DELETE"] = "D";
|
|
20
|
+
AdminCreateUserActionTypes["NO_ACTION"] = "";
|
|
21
|
+
})(AdminCreateUserActionTypes = exports.AdminCreateUserActionTypes || (exports.AdminCreateUserActionTypes = {}));
|
|
@@ -17,4 +17,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./req/create.entity"), exports);
|
|
18
18
|
__exportStar(require("./res/create.entity"), exports);
|
|
19
19
|
__exportStar(require("./internal/creation-process"), exports);
|
|
20
|
-
__exportStar(require("./internal/constants"), exports);
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { AdminCreateUserDto } from '../req/create.entity';
|
|
2
|
+
export declare enum AdminCreateUserStageTypes {
|
|
3
|
+
SALESMAN = "SALESMAN action",
|
|
4
|
+
SALESMAN_CREATE = "create salesman within Infonova",
|
|
5
|
+
SALESMAN_DELETE = "inactivate salesman in Infonova",
|
|
6
|
+
ARS = "ARS action",
|
|
7
|
+
ARS_CREATE = "create user within ARS",
|
|
8
|
+
ARS_ASSIGN_WOKGROUPS = "assign user workgroups within ARS",
|
|
9
|
+
ARS_DELETE = "inactivate user in ARS",
|
|
10
|
+
INFONOVA = "INFONOVA action",
|
|
11
|
+
INFONOVA_CREATE = "create user within INFONOVA",
|
|
12
|
+
INFONOVA_UPDATE_PASSWORD = "update user password within INFONOVA",
|
|
13
|
+
INFONOVA_ASSIGN_CHANNELS = "assign user channels within INFONOVA",
|
|
14
|
+
INFONOVA_DELETE = "inactivate user in INFONOVA"
|
|
4
15
|
}
|
|
5
|
-
export declare class
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
16
|
+
export declare class AdminCreateUserStageDto {
|
|
17
|
+
stage: AdminCreateUserStageTypes;
|
|
18
|
+
error: boolean;
|
|
19
|
+
output?: unknown;
|
|
9
20
|
}
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
stages:
|
|
13
|
-
}
|
|
14
|
-
export interface UserCreationStage {
|
|
15
|
-
stage: string;
|
|
16
|
-
success: boolean;
|
|
17
|
-
error: any;
|
|
18
|
-
}
|
|
19
|
-
export interface ChannelCreation {
|
|
20
|
-
id: string;
|
|
21
|
-
stage: string;
|
|
22
|
-
users: string[];
|
|
23
|
-
success: boolean;
|
|
24
|
-
error: any;
|
|
21
|
+
export declare class AdminCreateUserResDto {
|
|
22
|
+
input: AdminCreateUserDto;
|
|
23
|
+
stages: AdminCreateUserStageDto[];
|
|
25
24
|
}
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
3
|
+
exports.AdminCreateUserResDto = exports.AdminCreateUserStageDto = exports.AdminCreateUserStageTypes = void 0;
|
|
4
|
+
var AdminCreateUserStageTypes;
|
|
5
|
+
(function (AdminCreateUserStageTypes) {
|
|
6
|
+
AdminCreateUserStageTypes["SALESMAN"] = "SALESMAN action";
|
|
7
|
+
AdminCreateUserStageTypes["SALESMAN_CREATE"] = "create salesman within Infonova";
|
|
8
|
+
AdminCreateUserStageTypes["SALESMAN_DELETE"] = "inactivate salesman in Infonova";
|
|
9
|
+
AdminCreateUserStageTypes["ARS"] = "ARS action";
|
|
10
|
+
AdminCreateUserStageTypes["ARS_CREATE"] = "create user within ARS";
|
|
11
|
+
AdminCreateUserStageTypes["ARS_ASSIGN_WOKGROUPS"] = "assign user workgroups within ARS";
|
|
12
|
+
AdminCreateUserStageTypes["ARS_DELETE"] = "inactivate user in ARS";
|
|
13
|
+
AdminCreateUserStageTypes["INFONOVA"] = "INFONOVA action";
|
|
14
|
+
AdminCreateUserStageTypes["INFONOVA_CREATE"] = "create user within INFONOVA";
|
|
15
|
+
AdminCreateUserStageTypes["INFONOVA_UPDATE_PASSWORD"] = "update user password within INFONOVA";
|
|
16
|
+
AdminCreateUserStageTypes["INFONOVA_ASSIGN_CHANNELS"] = "assign user channels within INFONOVA";
|
|
17
|
+
AdminCreateUserStageTypes["INFONOVA_DELETE"] = "inactivate user in INFONOVA";
|
|
18
|
+
})(AdminCreateUserStageTypes = exports.AdminCreateUserStageTypes || (exports.AdminCreateUserStageTypes = {}));
|
|
19
|
+
class AdminCreateUserStageDto {
|
|
5
20
|
}
|
|
6
|
-
exports.
|
|
21
|
+
exports.AdminCreateUserStageDto = AdminCreateUserStageDto;
|
|
22
|
+
class AdminCreateUserResDto {
|
|
23
|
+
}
|
|
24
|
+
exports.AdminCreateUserResDto = AdminCreateUserResDto;
|
|
@@ -1,15 +1,52 @@
|
|
|
1
|
-
import { Role } from '@admin/constants/admin.constants';
|
|
2
|
-
export declare class
|
|
3
|
-
infonovaAction:
|
|
4
|
-
|
|
1
|
+
import { AdminCreateUserActionTypes, Language, Role } from '@admin/constants/admin.constants';
|
|
2
|
+
export declare class AdminCreateUserCsvDto {
|
|
3
|
+
infonovaAction: AdminCreateUserActionTypes;
|
|
4
|
+
username: string;
|
|
5
5
|
email: string;
|
|
6
|
-
language: string;
|
|
7
|
-
givenName: string;
|
|
8
|
-
familyName: string;
|
|
9
|
-
workGroupName: string[];
|
|
10
6
|
password: string;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
language: Language;
|
|
8
|
+
givenName?: string;
|
|
9
|
+
familyName?: string;
|
|
10
|
+
workgroup: string;
|
|
11
|
+
channel: string;
|
|
12
|
+
arsAction: AdminCreateUserActionTypes;
|
|
13
|
+
arsRole: Role;
|
|
14
|
+
arsWorkgroup: string;
|
|
15
|
+
arsTenant: string;
|
|
16
|
+
salesmanAction: AdminCreateUserActionTypes;
|
|
17
|
+
}
|
|
18
|
+
export declare class AdminCreateUserDto {
|
|
19
|
+
infonovaAction: AdminCreateUserActionTypes;
|
|
20
|
+
username: string;
|
|
21
|
+
email: string;
|
|
22
|
+
password: string;
|
|
23
|
+
language: Language;
|
|
24
|
+
givenName?: string;
|
|
25
|
+
familyName?: string;
|
|
26
|
+
workgroups: string[];
|
|
27
|
+
channels: string[];
|
|
28
|
+
arsAction: AdminCreateUserActionTypes;
|
|
29
|
+
arsRole: Role;
|
|
30
|
+
arsWorkgroups: string[];
|
|
31
|
+
arsTenants: string[];
|
|
32
|
+
salesmanAction: AdminCreateUserActionTypes;
|
|
33
|
+
}
|
|
34
|
+
export declare class CreateAuthDto {
|
|
35
|
+
username: string;
|
|
36
|
+
active: boolean;
|
|
37
|
+
role?: Role;
|
|
38
|
+
tenants: string[];
|
|
39
|
+
}
|
|
40
|
+
export declare class PatchAuthDto {
|
|
41
|
+
username?: string;
|
|
42
|
+
active?: boolean;
|
|
43
|
+
role?: Role;
|
|
44
|
+
tenants?: string[];
|
|
45
|
+
}
|
|
46
|
+
export declare class CreateAuthWorkgroupDto {
|
|
47
|
+
authId: number;
|
|
48
|
+
workgroupId: number;
|
|
49
|
+
}
|
|
50
|
+
export declare class PatchAuthWorkgroupDto {
|
|
51
|
+
active: boolean;
|
|
15
52
|
}
|
|
@@ -9,69 +9,227 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.PatchAuthWorkgroupDto = exports.CreateAuthWorkgroupDto = exports.PatchAuthDto = exports.CreateAuthDto = exports.AdminCreateUserDto = exports.AdminCreateUserCsvDto = void 0;
|
|
13
13
|
const openapi = require("@nestjs/swagger");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
-
const user_channel_1 = require("../../../../common/channel/user.channel");
|
|
16
15
|
const admin_constants_1 = require("../../../constants/admin.constants");
|
|
17
16
|
const _validators_1 = require("../../../../validators/index");
|
|
18
|
-
|
|
17
|
+
const class_transformer_1 = require("class-transformer");
|
|
18
|
+
const constants_1 = require("../../../../common/constants");
|
|
19
|
+
class AdminCreateUserCsvDto {
|
|
19
20
|
static _OPENAPI_METADATA_FACTORY() {
|
|
20
|
-
return { infonovaAction: { required: true,
|
|
21
|
+
return { infonovaAction: { required: true, enum: require("../../../constants/admin.constants").AdminCreateUserActionTypes }, username: { required: true, type: () => String }, email: { required: true, type: () => String }, password: { required: true, type: () => String }, language: { required: true, enum: require("../../../constants/admin.constants").Language }, givenName: { required: false, type: () => String }, familyName: { required: false, type: () => String }, workgroup: { required: true, type: () => String }, channel: { required: true, type: () => String }, arsAction: { required: true, enum: require("../../../constants/admin.constants").AdminCreateUserActionTypes }, arsRole: { required: true, enum: require("../../../constants/admin.constants").Role }, arsWorkgroup: { required: true, type: () => String }, arsTenant: { required: true, type: () => String }, salesmanAction: { required: true, enum: require("../../../constants/admin.constants").AdminCreateUserActionTypes } };
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
__decorate([
|
|
24
|
-
(0,
|
|
25
|
+
(0, _validators_1.IsEnum)(admin_constants_1.AdminCreateUserActionTypes),
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
25
27
|
__metadata("design:type", String)
|
|
26
|
-
],
|
|
28
|
+
], AdminCreateUserCsvDto.prototype, "infonovaAction", void 0);
|
|
27
29
|
__decorate([
|
|
28
30
|
(0, class_validator_1.IsNotEmpty)(),
|
|
31
|
+
(0, _validators_1.IsNotBlank)(),
|
|
29
32
|
(0, class_validator_1.IsString)(),
|
|
33
|
+
(0, class_transformer_1.Expose)(),
|
|
30
34
|
__metadata("design:type", String)
|
|
31
|
-
],
|
|
35
|
+
], AdminCreateUserCsvDto.prototype, "username", void 0);
|
|
32
36
|
__decorate([
|
|
33
|
-
(0, class_validator_1.
|
|
37
|
+
(0, class_validator_1.ValidateIf)((o) => o.infonovaAction === admin_constants_1.AdminCreateUserActionTypes.CREATE),
|
|
34
38
|
(0, class_validator_1.IsString)(),
|
|
39
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
40
|
+
(0, _validators_1.IsNotBlank)(),
|
|
41
|
+
(0, class_transformer_1.Expose)(),
|
|
42
|
+
(0, class_transformer_1.Transform)(({ value, obj }) => {
|
|
43
|
+
if ((!value || value === '') && obj.infonovaAction === admin_constants_1.AdminCreateUserActionTypes.CREATE) {
|
|
44
|
+
return obj.username;
|
|
45
|
+
}
|
|
46
|
+
return value;
|
|
47
|
+
}),
|
|
35
48
|
__metadata("design:type", String)
|
|
36
|
-
],
|
|
49
|
+
], AdminCreateUserCsvDto.prototype, "email", void 0);
|
|
37
50
|
__decorate([
|
|
38
|
-
(0, class_validator_1.
|
|
51
|
+
(0, class_validator_1.ValidateIf)((o) => o.infonovaAction === admin_constants_1.AdminCreateUserActionTypes.CREATE),
|
|
39
52
|
(0, class_validator_1.IsString)(),
|
|
53
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
54
|
+
(0, _validators_1.IsNotBlank)(),
|
|
55
|
+
(0, class_transformer_1.Expose)(),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], AdminCreateUserCsvDto.prototype, "password", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.ValidateIf)((o) => o.infonovaAction === admin_constants_1.AdminCreateUserActionTypes.CREATE),
|
|
40
60
|
(0, _validators_1.IsEnum)(admin_constants_1.Language),
|
|
61
|
+
(0, class_transformer_1.Expose)(),
|
|
62
|
+
(0, class_transformer_1.Transform)(({ value, obj }) => {
|
|
63
|
+
if ((!value || value === '') && obj.infonovaAction === admin_constants_1.AdminCreateUserActionTypes.CREATE) {
|
|
64
|
+
return admin_constants_1.Language.SPANISH;
|
|
65
|
+
}
|
|
66
|
+
return value !== '' ? value : undefined;
|
|
67
|
+
}),
|
|
41
68
|
__metadata("design:type", String)
|
|
42
|
-
],
|
|
69
|
+
], AdminCreateUserCsvDto.prototype, "language", void 0);
|
|
43
70
|
__decorate([
|
|
71
|
+
(0, class_validator_1.ValidateIf)((o) => o.infonovaAction === admin_constants_1.AdminCreateUserActionTypes.CREATE && o.givenName && o.givenName.length > 0),
|
|
44
72
|
(0, class_validator_1.IsString)(),
|
|
45
73
|
(0, class_validator_1.IsNotEmpty)(),
|
|
74
|
+
(0, _validators_1.IsNotBlank)(),
|
|
75
|
+
(0, class_transformer_1.Expose)(),
|
|
46
76
|
__metadata("design:type", String)
|
|
47
|
-
],
|
|
77
|
+
], AdminCreateUserCsvDto.prototype, "givenName", void 0);
|
|
48
78
|
__decorate([
|
|
79
|
+
(0, class_validator_1.ValidateIf)((o) => o.infonovaAction === admin_constants_1.AdminCreateUserActionTypes.CREATE && o.familyName && o.familyName.length > 0),
|
|
49
80
|
(0, class_validator_1.IsString)(),
|
|
81
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
82
|
+
(0, _validators_1.IsNotBlank)(),
|
|
83
|
+
(0, class_transformer_1.Expose)(),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], AdminCreateUserCsvDto.prototype, "familyName", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, class_validator_1.ValidateIf)((o) => o.infonovaAction === admin_constants_1.AdminCreateUserActionTypes.CREATE),
|
|
88
|
+
(0, class_validator_1.IsString)(),
|
|
89
|
+
(0, _validators_1.IsNotBlank)(),
|
|
90
|
+
(0, _validators_1.IsNotBlank)(),
|
|
91
|
+
(0, class_transformer_1.Expose)(),
|
|
92
|
+
__metadata("design:type", String)
|
|
93
|
+
], AdminCreateUserCsvDto.prototype, "workgroup", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, class_validator_1.ValidateIf)((o) => o.infonovaAction === admin_constants_1.AdminCreateUserActionTypes.CREATE),
|
|
96
|
+
(0, class_validator_1.IsString)(),
|
|
97
|
+
(0, _validators_1.IsNotBlank)(),
|
|
98
|
+
(0, _validators_1.IsNotBlank)(),
|
|
99
|
+
(0, class_transformer_1.Expose)(),
|
|
100
|
+
__metadata("design:type", String)
|
|
101
|
+
], AdminCreateUserCsvDto.prototype, "channel", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, _validators_1.IsEnum)(admin_constants_1.AdminCreateUserActionTypes),
|
|
104
|
+
(0, class_transformer_1.Expose)(),
|
|
105
|
+
__metadata("design:type", String)
|
|
106
|
+
], AdminCreateUserCsvDto.prototype, "arsAction", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, class_validator_1.ValidateIf)((o) => o.arsAction === admin_constants_1.AdminCreateUserActionTypes.CREATE && o.arsRole !== ''),
|
|
109
|
+
(0, _validators_1.IsEnum)(admin_constants_1.Role),
|
|
110
|
+
(0, class_validator_1.IsDefined)(),
|
|
111
|
+
(0, class_transformer_1.Expose)(),
|
|
50
112
|
__metadata("design:type", String)
|
|
51
|
-
],
|
|
113
|
+
], AdminCreateUserCsvDto.prototype, "arsRole", void 0);
|
|
52
114
|
__decorate([
|
|
115
|
+
(0, class_validator_1.ValidateIf)((o) => o.arsAction === admin_constants_1.AdminCreateUserActionTypes.CREATE),
|
|
116
|
+
(0, class_validator_1.IsString)(),
|
|
53
117
|
(0, class_validator_1.IsNotEmpty)(),
|
|
54
|
-
(0,
|
|
55
|
-
|
|
56
|
-
|
|
118
|
+
(0, _validators_1.IsNotBlank)(),
|
|
119
|
+
(0, class_transformer_1.Expose)(),
|
|
120
|
+
__metadata("design:type", String)
|
|
121
|
+
], AdminCreateUserCsvDto.prototype, "arsWorkgroup", void 0);
|
|
57
122
|
__decorate([
|
|
123
|
+
(0, class_validator_1.ValidateIf)((o) => o.arsAction === admin_constants_1.AdminCreateUserActionTypes.CREATE),
|
|
124
|
+
(0, class_validator_1.IsString)(),
|
|
58
125
|
(0, class_validator_1.IsNotEmpty)(),
|
|
126
|
+
(0, _validators_1.IsNotBlank)(),
|
|
127
|
+
(0, class_transformer_1.Expose)(),
|
|
128
|
+
(0, class_transformer_1.Transform)(({ value, obj }) => {
|
|
129
|
+
if ((!value || value === '') && obj.arsAction === admin_constants_1.AdminCreateUserActionTypes.CREATE) {
|
|
130
|
+
if (obj.arsRole === admin_constants_1.Role.ADMIN) {
|
|
131
|
+
return [constants_1.ArsTenant.SYS03, constants_1.ArsTenant.ADMIN].join(',');
|
|
132
|
+
}
|
|
133
|
+
return constants_1.ArsTenant.SYS03;
|
|
134
|
+
}
|
|
135
|
+
return value;
|
|
136
|
+
}),
|
|
137
|
+
__metadata("design:type", String)
|
|
138
|
+
], AdminCreateUserCsvDto.prototype, "arsTenant", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, _validators_1.IsEnum)(admin_constants_1.AdminCreateUserActionTypes),
|
|
141
|
+
(0, class_transformer_1.Expose)(),
|
|
142
|
+
__metadata("design:type", String)
|
|
143
|
+
], AdminCreateUserCsvDto.prototype, "salesmanAction", void 0);
|
|
144
|
+
exports.AdminCreateUserCsvDto = AdminCreateUserCsvDto;
|
|
145
|
+
class AdminCreateUserDto {
|
|
146
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
147
|
+
return { infonovaAction: { required: true, enum: require("../../../constants/admin.constants").AdminCreateUserActionTypes }, username: { required: true, type: () => String }, email: { required: true, type: () => String }, password: { required: true, type: () => String }, language: { required: true, enum: require("../../../constants/admin.constants").Language }, givenName: { required: false, type: () => String }, familyName: { required: false, type: () => String }, workgroups: { required: true, type: () => [String] }, channels: { required: true, type: () => [String] }, arsAction: { required: true, enum: require("../../../constants/admin.constants").AdminCreateUserActionTypes }, arsRole: { required: true, enum: require("../../../constants/admin.constants").Role }, arsWorkgroups: { required: true, type: () => [String] }, arsTenants: { required: true, type: () => [String] }, salesmanAction: { required: true, enum: require("../../../constants/admin.constants").AdminCreateUserActionTypes } };
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
exports.AdminCreateUserDto = AdminCreateUserDto;
|
|
151
|
+
class CreateAuthDto {
|
|
152
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
153
|
+
return { username: { required: true, type: () => String }, active: { required: true, type: () => Boolean }, role: { required: false, enum: require("../../../constants/admin.constants").Role }, tenants: { required: true, type: () => [String] } };
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
__decorate([
|
|
59
157
|
(0, class_validator_1.IsString)(),
|
|
158
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
159
|
+
(0, _validators_1.IsNotBlank)(),
|
|
60
160
|
__metadata("design:type", String)
|
|
61
|
-
],
|
|
161
|
+
], CreateAuthDto.prototype, "username", void 0);
|
|
62
162
|
__decorate([
|
|
163
|
+
(0, class_validator_1.IsBoolean)(),
|
|
164
|
+
__metadata("design:type", Boolean)
|
|
165
|
+
], CreateAuthDto.prototype, "active", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, _validators_1.IsEnum)(admin_constants_1.Role),
|
|
63
168
|
(0, class_validator_1.IsOptional)(),
|
|
64
|
-
(0, class_validator_1.IsString)(),
|
|
65
169
|
__metadata("design:type", String)
|
|
66
|
-
],
|
|
170
|
+
], CreateAuthDto.prototype, "role", void 0);
|
|
67
171
|
__decorate([
|
|
68
172
|
(0, class_validator_1.IsArray)(),
|
|
69
|
-
(0, class_validator_1.
|
|
70
|
-
(0,
|
|
173
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
174
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
175
|
+
(0, class_validator_1.IsNotEmpty)({ each: true }),
|
|
176
|
+
(0, _validators_1.IsNotBlank)({ each: true }),
|
|
71
177
|
__metadata("design:type", Array)
|
|
72
|
-
],
|
|
178
|
+
], CreateAuthDto.prototype, "tenants", void 0);
|
|
179
|
+
exports.CreateAuthDto = CreateAuthDto;
|
|
180
|
+
class PatchAuthDto {
|
|
181
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
182
|
+
return { username: { required: false, type: () => String }, active: { required: false, type: () => Boolean }, role: { required: false, enum: require("../../../constants/admin.constants").Role }, tenants: { required: false, type: () => [String] } };
|
|
183
|
+
}
|
|
184
|
+
}
|
|
73
185
|
__decorate([
|
|
74
186
|
(0, class_validator_1.IsString)(),
|
|
187
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
188
|
+
(0, _validators_1.IsNotBlank)(),
|
|
189
|
+
(0, class_validator_1.IsOptional)(),
|
|
190
|
+
__metadata("design:type", String)
|
|
191
|
+
], PatchAuthDto.prototype, "username", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
(0, class_validator_1.IsBoolean)(),
|
|
194
|
+
(0, class_validator_1.IsOptional)(),
|
|
195
|
+
__metadata("design:type", Boolean)
|
|
196
|
+
], PatchAuthDto.prototype, "active", void 0);
|
|
197
|
+
__decorate([
|
|
198
|
+
(0, _validators_1.IsEnum)(admin_constants_1.Role),
|
|
199
|
+
(0, class_validator_1.IsOptional)(),
|
|
75
200
|
__metadata("design:type", String)
|
|
76
|
-
],
|
|
77
|
-
|
|
201
|
+
], PatchAuthDto.prototype, "role", void 0);
|
|
202
|
+
__decorate([
|
|
203
|
+
(0, class_validator_1.IsArray)(),
|
|
204
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
205
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
206
|
+
(0, class_validator_1.IsNotEmpty)({ each: true }),
|
|
207
|
+
(0, _validators_1.IsNotBlank)({ each: true }),
|
|
208
|
+
(0, class_validator_1.IsOptional)(),
|
|
209
|
+
__metadata("design:type", Array)
|
|
210
|
+
], PatchAuthDto.prototype, "tenants", void 0);
|
|
211
|
+
exports.PatchAuthDto = PatchAuthDto;
|
|
212
|
+
class CreateAuthWorkgroupDto {
|
|
213
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
214
|
+
return { authId: { required: true, type: () => Number }, workgroupId: { required: true, type: () => Number } };
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
__decorate([
|
|
218
|
+
(0, class_validator_1.IsInt)(),
|
|
219
|
+
__metadata("design:type", Number)
|
|
220
|
+
], CreateAuthWorkgroupDto.prototype, "authId", void 0);
|
|
221
|
+
__decorate([
|
|
222
|
+
(0, class_validator_1.IsInt)(),
|
|
223
|
+
__metadata("design:type", Number)
|
|
224
|
+
], CreateAuthWorkgroupDto.prototype, "workgroupId", void 0);
|
|
225
|
+
exports.CreateAuthWorkgroupDto = CreateAuthWorkgroupDto;
|
|
226
|
+
class PatchAuthWorkgroupDto {
|
|
227
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
228
|
+
return { active: { required: true, type: () => Boolean } };
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
__decorate([
|
|
232
|
+
(0, class_validator_1.IsBoolean)(),
|
|
233
|
+
__metadata("design:type", Boolean)
|
|
234
|
+
], PatchAuthWorkgroupDto.prototype, "active", void 0);
|
|
235
|
+
exports.PatchAuthWorkgroupDto = PatchAuthWorkgroupDto;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Language } from '@admin/constants';
|
|
2
|
+
import { PartyType, UserState } from '..';
|
|
1
3
|
export declare class BpOAuthCredentialDto {
|
|
2
4
|
access_token: string;
|
|
3
5
|
expires_in: number;
|
|
@@ -8,3 +10,22 @@ export declare class BpOAuthCredentialDto {
|
|
|
8
10
|
scope: string;
|
|
9
11
|
exp: Date;
|
|
10
12
|
}
|
|
13
|
+
export declare class BpUserRelatedPartyDto {
|
|
14
|
+
type: PartyType.INDIVIDUAL;
|
|
15
|
+
givenName: string;
|
|
16
|
+
name: string;
|
|
17
|
+
familyName: string;
|
|
18
|
+
role: 'User';
|
|
19
|
+
}
|
|
20
|
+
export declare class BpUserAccessMappingDto {
|
|
21
|
+
workGroupName: string;
|
|
22
|
+
}
|
|
23
|
+
export declare class BpUserDto {
|
|
24
|
+
name: string;
|
|
25
|
+
state: UserState;
|
|
26
|
+
email: string;
|
|
27
|
+
language: Language;
|
|
28
|
+
relatedParty: BpUserRelatedPartyDto;
|
|
29
|
+
userAccessMappings: BpUserAccessMappingDto[];
|
|
30
|
+
tenantGroupAccessMappings?: BpUserAccessMappingDto[];
|
|
31
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BpOAuthCredentialDto = void 0;
|
|
3
|
+
exports.BpUserDto = exports.BpUserAccessMappingDto = exports.BpUserRelatedPartyDto = exports.BpOAuthCredentialDto = void 0;
|
|
4
4
|
const openapi = require("@nestjs/swagger");
|
|
5
5
|
class BpOAuthCredentialDto {
|
|
6
6
|
static _OPENAPI_METADATA_FACTORY() {
|
|
@@ -8,3 +8,21 @@ class BpOAuthCredentialDto {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
exports.BpOAuthCredentialDto = BpOAuthCredentialDto;
|
|
11
|
+
class BpUserRelatedPartyDto {
|
|
12
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
13
|
+
return { type: { required: true, type: () => String, enum: require("../constants/bp.constants").PartyType.INDIVIDUAL }, givenName: { required: true, type: () => String }, name: { required: true, type: () => String }, familyName: { required: true, type: () => String }, role: { required: true, type: () => String } };
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.BpUserRelatedPartyDto = BpUserRelatedPartyDto;
|
|
17
|
+
class BpUserAccessMappingDto {
|
|
18
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
19
|
+
return { workGroupName: { required: true, type: () => String } };
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.BpUserAccessMappingDto = BpUserAccessMappingDto;
|
|
23
|
+
class BpUserDto {
|
|
24
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
25
|
+
return { name: { required: true, type: () => String }, state: { required: true, enum: require("../constants/bp.constants").UserState }, email: { required: true, type: () => String }, language: { required: true, enum: require("../../admin/constants/admin.constants").Language }, relatedParty: { required: true, type: () => require("./auth.entity").BpUserRelatedPartyDto }, userAccessMappings: { required: true, type: () => [require("./auth.entity").BpUserAccessMappingDto] }, tenantGroupAccessMappings: { required: false, type: () => [require("./auth.entity").BpUserAccessMappingDto] } };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.BpUserDto = BpUserDto;
|
|
@@ -5,8 +5,8 @@ export declare class BpLookupOptionDto {
|
|
|
5
5
|
displayOrder: number;
|
|
6
6
|
active: boolean;
|
|
7
7
|
description: string;
|
|
8
|
-
parentArea
|
|
9
|
-
parentName
|
|
8
|
+
parentArea?: string;
|
|
9
|
+
parentName?: string;
|
|
10
10
|
configurationLevel: string;
|
|
11
11
|
}
|
|
12
12
|
export declare class BpQueryLookupOptionsDto {
|
|
@@ -4,7 +4,7 @@ exports.BpQueryLookupOptionsDto = exports.BpLookupOptionDto = void 0;
|
|
|
4
4
|
const openapi = require("@nestjs/swagger");
|
|
5
5
|
class BpLookupOptionDto {
|
|
6
6
|
static _OPENAPI_METADATA_FACTORY() {
|
|
7
|
-
return { area: { required: true, type: () => String }, name: { required: true, type: () => String }, displayName: { required: true, type: () => String }, displayOrder: { required: true, type: () => Number }, active: { required: true, type: () => Boolean }, description: { required: true, type: () => String }, parentArea: { required:
|
|
7
|
+
return { area: { required: true, type: () => String }, name: { required: true, type: () => String }, displayName: { required: true, type: () => String }, displayOrder: { required: true, type: () => Number }, active: { required: true, type: () => Boolean }, description: { required: true, type: () => String }, parentArea: { required: false, type: () => String }, parentName: { required: false, type: () => String }, configurationLevel: { required: true, type: () => String } };
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
exports.BpLookupOptionDto = BpLookupOptionDto;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { BpCustomerAccountDto, BpCustomerAccountIndividualDto, BpCustomerAccountOrganizationDto } from '../customer';
|
|
2
2
|
import { BpPaymentMethodDto } from '../payment-method.entity';
|
|
3
3
|
import { BpProductInventoryDto } from '../product-offering';
|
|
4
|
+
export declare class BpPutParamsDto {
|
|
5
|
+
keepExisting: boolean;
|
|
6
|
+
}
|
|
4
7
|
export declare class BpSearchParamsDto {
|
|
5
8
|
pageSize: string;
|
|
6
9
|
page: string;
|
|
@@ -9,9 +9,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.BpQueryPaymenMethodsDto = exports.BpQueryResultDto = exports.BpQueryProductInventoryDto = exports.BpQueryCustomersDto = exports.BpQueryOrganizationPartiesDto = exports.BpQueryIndividualPartiesDto = exports.BpLinksDto = exports.BpLinkDto = exports.BpPaginationInformationDto = exports.BpSearchParamsDto = void 0;
|
|
12
|
+
exports.BpQueryPaymenMethodsDto = exports.BpQueryResultDto = exports.BpQueryProductInventoryDto = exports.BpQueryCustomersDto = exports.BpQueryOrganizationPartiesDto = exports.BpQueryIndividualPartiesDto = exports.BpLinksDto = exports.BpLinkDto = exports.BpPaginationInformationDto = exports.BpSearchParamsDto = exports.BpPutParamsDto = void 0;
|
|
13
13
|
const openapi = require("@nestjs/swagger");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
class BpPutParamsDto {
|
|
16
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
17
|
+
return { keepExisting: { required: true, type: () => Boolean } };
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.BpPutParamsDto = BpPutParamsDto;
|
|
15
21
|
class BpSearchParamsDto {
|
|
16
22
|
static _OPENAPI_METADATA_FACTORY() {
|
|
17
23
|
return { pageSize: { required: true, type: () => String }, page: { required: true, type: () => String }, filter: { required: true, type: () => String }, query: { required: true, type: () => String }, sortBy: { required: true, type: () => String }, sortOrder: { required: true, type: () => String } };
|
|
@@ -132,6 +132,10 @@ export declare enum PersonTitle {
|
|
|
132
132
|
MR = "MR",
|
|
133
133
|
MRS = "MRS"
|
|
134
134
|
}
|
|
135
|
+
export declare enum UserState {
|
|
136
|
+
ACTIVE = "Active",
|
|
137
|
+
INACTIVE = "Inactive"
|
|
138
|
+
}
|
|
135
139
|
export declare enum AccountState {
|
|
136
140
|
NEW = "New",
|
|
137
141
|
PENDING_ACTIVE = "PendingActive",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PreferredContactTime = exports.BusinessSegmentType = exports.CustomerAccountHistoryType = exports.PaymentMethodType = exports.DeliveryMethod = exports.DocumentType = exports.PartyStateType = exports.RelatedPartyRoleType = exports.IndustryType = exports.CustomerAccountOrganizationEntityType = exports.IdentificationType = exports.ContactMediumTelephoneType = exports.CustomerAccountContactMediumRoleType = exports.CustomerAccountContactMediumContactType = exports.CustomerAccountContactMediumType = exports.CustomerAccountParametersAdamoCustomerIdRep = exports.ContactType = exports.AccountState = exports.PersonTitle = exports.Timezone = exports.PreferredLanguage = exports.EntityType = exports.PartyType = exports.CustomerType = exports.ServiceSpecificationDictionary = exports.ServiceSpecificationType = exports.ProductOrderType = exports.ShoppingCartItemAction = exports.ProrationConditionType = exports.ProrationModeType = exports.AssignmentType = exports.CurrencyType = exports.TaxType = exports.DependencySourceTargetType = exports.DependencyType = exports.ProductCatalogItemState = exports.MobileVisibilityType = exports.ConfigurationAttributeType = void 0;
|
|
3
|
+
exports.PreferredContactTime = exports.BusinessSegmentType = exports.CustomerAccountHistoryType = exports.PaymentMethodType = exports.DeliveryMethod = exports.DocumentType = exports.PartyStateType = exports.RelatedPartyRoleType = exports.IndustryType = exports.CustomerAccountOrganizationEntityType = exports.IdentificationType = exports.ContactMediumTelephoneType = exports.CustomerAccountContactMediumRoleType = exports.CustomerAccountContactMediumContactType = exports.CustomerAccountContactMediumType = exports.CustomerAccountParametersAdamoCustomerIdRep = exports.ContactType = exports.AccountState = exports.UserState = exports.PersonTitle = exports.Timezone = exports.PreferredLanguage = exports.EntityType = exports.PartyType = exports.CustomerType = exports.ServiceSpecificationDictionary = exports.ServiceSpecificationType = exports.ProductOrderType = exports.ShoppingCartItemAction = exports.ProrationConditionType = exports.ProrationModeType = exports.AssignmentType = exports.CurrencyType = exports.TaxType = exports.DependencySourceTargetType = exports.DependencyType = exports.ProductCatalogItemState = exports.MobileVisibilityType = exports.ConfigurationAttributeType = void 0;
|
|
4
4
|
var ConfigurationAttributeType;
|
|
5
5
|
(function (ConfigurationAttributeType) {
|
|
6
6
|
ConfigurationAttributeType["BINDING_PERIOD"] = "BINDING_PERIOD";
|
|
@@ -155,6 +155,11 @@ var PersonTitle;
|
|
|
155
155
|
PersonTitle["MR"] = "MR";
|
|
156
156
|
PersonTitle["MRS"] = "MRS";
|
|
157
157
|
})(PersonTitle = exports.PersonTitle || (exports.PersonTitle = {}));
|
|
158
|
+
var UserState;
|
|
159
|
+
(function (UserState) {
|
|
160
|
+
UserState["ACTIVE"] = "Active";
|
|
161
|
+
UserState["INACTIVE"] = "Inactive";
|
|
162
|
+
})(UserState = exports.UserState || (exports.UserState = {}));
|
|
158
163
|
var AccountState;
|
|
159
164
|
(function (AccountState) {
|
|
160
165
|
AccountState["NEW"] = "New";
|