@alba-cars/common-modules 1.8.8 → 1.9.0
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.
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.SalesAgentUpdateDTO = exports.SalesAgentCreateDTO = exports.SalesAgentGetDTO = exports.Languages = exports.Designation = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const
|
|
15
|
+
const auth_1 = require("../../../auth");
|
|
16
16
|
var Designation;
|
|
17
17
|
(function (Designation) {
|
|
18
18
|
Designation["MANAGER"] = "sales-manager";
|
|
@@ -140,7 +140,7 @@ class SalesAgentCreateDTO {
|
|
|
140
140
|
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
141
141
|
}
|
|
142
142
|
toUserDTO() {
|
|
143
|
-
const userDto = new
|
|
143
|
+
const userDto = new auth_1.UserCreateDTO();
|
|
144
144
|
userDto.name = this.name;
|
|
145
145
|
userDto.email = this.email;
|
|
146
146
|
userDto.phone = this.phone;
|
|
@@ -212,7 +212,7 @@ class SalesAgentUpdateDTO {
|
|
|
212
212
|
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
213
213
|
}
|
|
214
214
|
toUserDTO() {
|
|
215
|
-
const userDto = new
|
|
215
|
+
const userDto = new auth_1.UserUpdateDTO();
|
|
216
216
|
if (this.name)
|
|
217
217
|
userDto.name = this.name;
|
|
218
218
|
if (this.email)
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.9.0",
|
|
7
7
|
"description": "A package containing DTOs, validation classes and common modules and interfaces for Alba Cars",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -33,11 +33,10 @@
|
|
|
33
33
|
"url": "git+https://github.com/alba-cars/AlbaCarsCommonModules.git"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@alba-cars/common-modules": "^1.7.4",
|
|
37
36
|
"axios": "^1.7.9",
|
|
38
37
|
"class-transformer": "^0.5.1",
|
|
39
38
|
"class-validator": "^0.14.1",
|
|
40
|
-
|
|
39
|
+
|
|
41
40
|
"qs": "^6.13.1"
|
|
42
41
|
},
|
|
43
42
|
"devDependencies": {
|