@alba-cars/common-modules 1.8.3 → 1.8.5
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/core/network/endpoint-config.d.ts +1 -0
- package/dist/core/network/endpoint-config.js +1 -0
- package/dist/features/faq/data/enums/index.d.ts +1 -0
- package/dist/features/faq/data/enums/index.js +1 -0
- package/dist/features/lead/data/dto/index.d.ts +1 -0
- package/dist/features/lead/data/dto/index.js +1 -0
- package/dist/features/sales-team/data/dto/SalesAgentDTO.d.ts +62 -19
- package/dist/features/sales-team/data/dto/SalesAgentDTO.js +171 -51
- package/dist/features/showroom-visit/data/dto/ShowroomVisit.d.ts +4 -10
- package/dist/features/showroom-visit/data/dto/ShowroomVisit.js +2 -10
- package/dist/features/showroom-visit/data/enums/index.d.ts +11 -0
- package/dist/features/showroom-visit/data/enums/index.js +17 -0
- package/dist/features/showroom-visit/data/index.d.ts +1 -0
- package/dist/features/showroom-visit/data/index.js +1 -0
- package/dist/features/vehicle/data/dto/VehicleFinanceDTO.d.ts +0 -6
- package/dist/features/vehicle/data/dto/VehicleFinanceDTO.js +0 -30
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ type MetaEndpoints = BaseEndpoint & {
|
|
|
22
22
|
aiGenerateTitle: EndpointFunction;
|
|
23
23
|
aiGenerateDescription: EndpointFunction;
|
|
24
24
|
aiGenerateKeyword: EndpointFunction;
|
|
25
|
+
aiGenerateVehicleDescription: EndpointFunction;
|
|
25
26
|
};
|
|
26
27
|
type DepositEndpoints = BaseEndpoint & {
|
|
27
28
|
initiateRefund: string | EndpointFunction;
|
|
@@ -67,6 +67,7 @@ exports.API_ENDPOINTS = {
|
|
|
67
67
|
aiGenerateTitle: (id) => `/vehicle-meta-data/generate/title/${id}`,
|
|
68
68
|
aiGenerateDescription: (id) => `/vehicle-meta-data/generate/description/${id}`,
|
|
69
69
|
aiGenerateKeyword: (id) => `/vehicle-meta-data/generate/keywords/${id}`,
|
|
70
|
+
aiGenerateVehicleDescription: (id) => `/vehicle-meta-data/generate/vehicle-description/${id}`,
|
|
70
71
|
},
|
|
71
72
|
TestDrive: {
|
|
72
73
|
getAll: `/test-drive-requests`,
|
|
@@ -5,5 +5,6 @@ var FaqCategory;
|
|
|
5
5
|
(function (FaqCategory) {
|
|
6
6
|
FaqCategory["FINANCE"] = "FINANCE";
|
|
7
7
|
FaqCategory["SELL_CAR"] = "SELL_CAR";
|
|
8
|
+
FaqCategory["BUY_CAR"] = "BUY_CAR";
|
|
8
9
|
FaqCategory["HOME_PAGE"] = "HOME_PAGE";
|
|
9
10
|
})(FaqCategory = exports.FaqCategory || (exports.FaqCategory = {}));
|
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./lead_dto"), exports);
|
|
18
18
|
__exportStar(require("./lead_preference_history_dto"), exports);
|
|
19
19
|
__exportStar(require("./lead_prefernce_dto"), exports);
|
|
20
|
+
__exportStar(require("./lead_documents_dto"), exports);
|
|
@@ -1,46 +1,89 @@
|
|
|
1
|
-
import { UserCreateDTO,
|
|
2
|
-
import { LanguageDTO } from "./LanguageDTO";
|
|
1
|
+
import { UserCreateDTO, UserUpdateDTO } from "@alba-cars/common-modules";
|
|
3
2
|
export declare enum Designation {
|
|
4
3
|
MANAGER = "sales-manager",
|
|
5
4
|
EXECUTIVE = "sales-executive"
|
|
6
5
|
}
|
|
6
|
+
export declare enum Languages {
|
|
7
|
+
ARABIC = "Arabic",
|
|
8
|
+
PERSIAN = "Persian",
|
|
9
|
+
TURKISH = "Turkish",
|
|
10
|
+
HEBREW = "Hebrew",
|
|
11
|
+
HINDI = "Hindi",
|
|
12
|
+
URDU = "Urdu",
|
|
13
|
+
BENGALI = "Bengali",
|
|
14
|
+
PUNJABI = "Punjabi",
|
|
15
|
+
MALAYALAM = "Malayalam",
|
|
16
|
+
TAMIL = "Tamil",
|
|
17
|
+
TELUGU = "Telugu",
|
|
18
|
+
SINHALESE = "Sinhalese",
|
|
19
|
+
MANDARIN = "Mandarin",
|
|
20
|
+
CANTONESE = "Cantonese",
|
|
21
|
+
KOREAN = "Korean",
|
|
22
|
+
JAPANESE = "Japanese",
|
|
23
|
+
VIETNAMESE = "Vietnamese",
|
|
24
|
+
THAI = "Thai",
|
|
25
|
+
FILIPINO = "Filipino",
|
|
26
|
+
INDONESIAN = "Indonesian",
|
|
27
|
+
MALAY = "Malay",
|
|
28
|
+
ENGLISH = "English",
|
|
29
|
+
FRENCH = "French",
|
|
30
|
+
GERMAN = "German",
|
|
31
|
+
SPANISH = "Spanish",
|
|
32
|
+
ITALIAN = "Italian",
|
|
33
|
+
RUSSIAN = "Russian",
|
|
34
|
+
SWAHILI = "Swahili",
|
|
35
|
+
AMHARIC = "Amharic",
|
|
36
|
+
SOMALI = "Somali"
|
|
37
|
+
}
|
|
7
38
|
export declare class SalesAgentGetDTO {
|
|
8
39
|
id: string;
|
|
40
|
+
refId: number;
|
|
41
|
+
name: string;
|
|
42
|
+
phone: string;
|
|
43
|
+
email: string;
|
|
44
|
+
photo?: string;
|
|
45
|
+
agentIntro?: string;
|
|
46
|
+
bioVideoUrl?: string;
|
|
9
47
|
status: number;
|
|
10
48
|
designation: Designation;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
49
|
+
languages: Languages[];
|
|
50
|
+
isActive: boolean;
|
|
51
|
+
lastLogin?: Date;
|
|
52
|
+
createdAt: Date;
|
|
53
|
+
updatedAt: Date;
|
|
15
54
|
static fromPlain(plain: Record<string, unknown>): SalesAgentGetDTO;
|
|
16
55
|
toPlain(): Record<string, unknown>;
|
|
17
56
|
}
|
|
18
57
|
export declare class SalesAgentCreateDTO {
|
|
19
|
-
status?: number;
|
|
20
|
-
designation?: Designation;
|
|
21
58
|
name: string;
|
|
22
|
-
email?: string;
|
|
23
59
|
phone: string;
|
|
24
|
-
|
|
25
|
-
languageIds?: string[];
|
|
60
|
+
email: string;
|
|
26
61
|
photo?: string;
|
|
62
|
+
agentIntro?: string;
|
|
63
|
+
bioVideoUrl?: string;
|
|
64
|
+
status?: number;
|
|
65
|
+
designation: Designation;
|
|
66
|
+
languages: Languages[];
|
|
27
67
|
validate(): string[];
|
|
28
|
-
static fromPlain(plain: Record<string, unknown>): SalesAgentCreateDTO;
|
|
29
68
|
toUserDTO(): UserCreateDTO;
|
|
30
69
|
toSalesAgentData(): Partial<any>;
|
|
70
|
+
static fromPlain(plain: Record<string, unknown>): SalesAgentCreateDTO;
|
|
71
|
+
toPlain(): Record<string, unknown>;
|
|
31
72
|
}
|
|
32
73
|
export declare class SalesAgentUpdateDTO {
|
|
33
|
-
id?: string;
|
|
34
|
-
status?: number;
|
|
35
|
-
designation?: Designation;
|
|
36
|
-
agentIntro?: string;
|
|
37
74
|
name?: string;
|
|
38
|
-
languageIds?: string[];
|
|
39
|
-
email?: string;
|
|
40
75
|
phone?: string;
|
|
76
|
+
email?: string;
|
|
41
77
|
photo?: string;
|
|
78
|
+
agentIntro?: string;
|
|
79
|
+
bioVideoUrl?: string;
|
|
80
|
+
status?: number;
|
|
81
|
+
designation?: Designation;
|
|
82
|
+
languages?: Languages[];
|
|
83
|
+
isActive?: boolean;
|
|
42
84
|
validate(): string[];
|
|
43
|
-
static fromPlain(plain: Record<string, unknown>): SalesAgentUpdateDTO;
|
|
44
85
|
toUserDTO(): UserUpdateDTO;
|
|
45
86
|
toSalesAgentData(): Partial<any>;
|
|
87
|
+
static fromPlain(plain: Record<string, unknown>): SalesAgentUpdateDTO;
|
|
88
|
+
toPlain(): Record<string, unknown>;
|
|
46
89
|
}
|
|
@@ -9,15 +9,53 @@ 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.SalesAgentUpdateDTO = exports.SalesAgentCreateDTO = exports.SalesAgentGetDTO = exports.Designation = void 0;
|
|
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 common_modules_1 = require("@alba-cars/common-modules");
|
|
16
16
|
var Designation;
|
|
17
17
|
(function (Designation) {
|
|
18
18
|
Designation["MANAGER"] = "sales-manager";
|
|
19
19
|
Designation["EXECUTIVE"] = "sales-executive";
|
|
20
20
|
})(Designation = exports.Designation || (exports.Designation = {}));
|
|
21
|
+
var Languages;
|
|
22
|
+
(function (Languages) {
|
|
23
|
+
// Middle Eastern Languages
|
|
24
|
+
Languages["ARABIC"] = "Arabic";
|
|
25
|
+
Languages["PERSIAN"] = "Persian";
|
|
26
|
+
Languages["TURKISH"] = "Turkish";
|
|
27
|
+
Languages["HEBREW"] = "Hebrew";
|
|
28
|
+
// South Asian Languages
|
|
29
|
+
Languages["HINDI"] = "Hindi";
|
|
30
|
+
Languages["URDU"] = "Urdu";
|
|
31
|
+
Languages["BENGALI"] = "Bengali";
|
|
32
|
+
Languages["PUNJABI"] = "Punjabi";
|
|
33
|
+
Languages["MALAYALAM"] = "Malayalam";
|
|
34
|
+
Languages["TAMIL"] = "Tamil";
|
|
35
|
+
Languages["TELUGU"] = "Telugu";
|
|
36
|
+
Languages["SINHALESE"] = "Sinhalese";
|
|
37
|
+
// East Asian Languages
|
|
38
|
+
Languages["MANDARIN"] = "Mandarin";
|
|
39
|
+
Languages["CANTONESE"] = "Cantonese";
|
|
40
|
+
Languages["KOREAN"] = "Korean";
|
|
41
|
+
Languages["JAPANESE"] = "Japanese";
|
|
42
|
+
Languages["VIETNAMESE"] = "Vietnamese";
|
|
43
|
+
Languages["THAI"] = "Thai";
|
|
44
|
+
Languages["FILIPINO"] = "Filipino";
|
|
45
|
+
Languages["INDONESIAN"] = "Indonesian";
|
|
46
|
+
Languages["MALAY"] = "Malay";
|
|
47
|
+
// European Languages
|
|
48
|
+
Languages["ENGLISH"] = "English";
|
|
49
|
+
Languages["FRENCH"] = "French";
|
|
50
|
+
Languages["GERMAN"] = "German";
|
|
51
|
+
Languages["SPANISH"] = "Spanish";
|
|
52
|
+
Languages["ITALIAN"] = "Italian";
|
|
53
|
+
Languages["RUSSIAN"] = "Russian";
|
|
54
|
+
// African Languages
|
|
55
|
+
Languages["SWAHILI"] = "Swahili";
|
|
56
|
+
Languages["AMHARIC"] = "Amharic";
|
|
57
|
+
Languages["SOMALI"] = "Somali";
|
|
58
|
+
})(Languages = exports.Languages || (exports.Languages = {}));
|
|
21
59
|
class SalesAgentGetDTO {
|
|
22
60
|
static fromPlain(plain) {
|
|
23
61
|
return (0, class_transformer_1.plainToClass)(SalesAgentGetDTO, plain);
|
|
@@ -27,25 +65,82 @@ class SalesAgentGetDTO {
|
|
|
27
65
|
}
|
|
28
66
|
}
|
|
29
67
|
__decorate([
|
|
30
|
-
(0, class_validator_1.IsOptional)(),
|
|
31
68
|
(0, class_validator_1.IsString)(),
|
|
32
69
|
__metadata("design:type", String)
|
|
70
|
+
], SalesAgentGetDTO.prototype, "id", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, class_validator_1.IsNumber)(),
|
|
73
|
+
__metadata("design:type", Number)
|
|
74
|
+
], SalesAgentGetDTO.prototype, "refId", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, class_validator_1.IsString)(),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], SalesAgentGetDTO.prototype, "name", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, class_validator_1.IsString)(),
|
|
81
|
+
(0, class_validator_1.IsPhoneNumber)(),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], SalesAgentGetDTO.prototype, "phone", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, class_validator_1.IsEmail)(),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], SalesAgentGetDTO.prototype, "email", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, class_validator_1.IsString)(),
|
|
90
|
+
(0, class_validator_1.IsOptional)(),
|
|
91
|
+
__metadata("design:type", String)
|
|
33
92
|
], SalesAgentGetDTO.prototype, "photo", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, class_validator_1.IsString)(),
|
|
95
|
+
(0, class_validator_1.IsOptional)(),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], SalesAgentGetDTO.prototype, "agentIntro", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, class_validator_1.IsString)(),
|
|
100
|
+
(0, class_validator_1.IsOptional)(),
|
|
101
|
+
__metadata("design:type", String)
|
|
102
|
+
], SalesAgentGetDTO.prototype, "bioVideoUrl", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, class_validator_1.IsNumber)(),
|
|
105
|
+
__metadata("design:type", Number)
|
|
106
|
+
], SalesAgentGetDTO.prototype, "status", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, class_validator_1.IsEnum)(Designation),
|
|
109
|
+
__metadata("design:type", String)
|
|
110
|
+
], SalesAgentGetDTO.prototype, "designation", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, class_validator_1.IsArray)(),
|
|
113
|
+
(0, class_validator_1.IsEnum)(Languages, { each: true }),
|
|
114
|
+
__metadata("design:type", Array)
|
|
115
|
+
], SalesAgentGetDTO.prototype, "languages", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, class_validator_1.IsBoolean)(),
|
|
118
|
+
__metadata("design:type", Boolean)
|
|
119
|
+
], SalesAgentGetDTO.prototype, "isActive", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, class_validator_1.IsDate)(),
|
|
122
|
+
(0, class_validator_1.IsOptional)(),
|
|
123
|
+
__metadata("design:type", Date)
|
|
124
|
+
], SalesAgentGetDTO.prototype, "lastLogin", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, class_validator_1.IsDate)(),
|
|
127
|
+
__metadata("design:type", Date)
|
|
128
|
+
], SalesAgentGetDTO.prototype, "createdAt", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
(0, class_validator_1.IsDate)(),
|
|
131
|
+
__metadata("design:type", Date)
|
|
132
|
+
], SalesAgentGetDTO.prototype, "updatedAt", void 0);
|
|
34
133
|
exports.SalesAgentGetDTO = SalesAgentGetDTO;
|
|
35
134
|
class SalesAgentCreateDTO {
|
|
36
135
|
constructor() {
|
|
37
136
|
this.status = 1;
|
|
38
|
-
this.designation = Designation.EXECUTIVE;
|
|
39
137
|
}
|
|
40
138
|
validate() {
|
|
41
139
|
const errors = (0, class_validator_1.validateSync)(this);
|
|
42
140
|
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
43
141
|
}
|
|
44
|
-
static fromPlain(plain) {
|
|
45
|
-
return (0, class_transformer_1.plainToClass)(SalesAgentCreateDTO, plain);
|
|
46
|
-
}
|
|
47
142
|
toUserDTO() {
|
|
48
|
-
const userDto = new
|
|
143
|
+
const userDto = new common_modules_1.UserCreateDTO();
|
|
49
144
|
userDto.name = this.name;
|
|
50
145
|
userDto.email = this.email;
|
|
51
146
|
userDto.phone = this.phone;
|
|
@@ -56,61 +151,68 @@ class SalesAgentCreateDTO {
|
|
|
56
151
|
return {
|
|
57
152
|
status: this.status,
|
|
58
153
|
designation: this.designation,
|
|
59
|
-
languages: this.
|
|
154
|
+
languages: this.languages,
|
|
60
155
|
agentIntro: this.agentIntro,
|
|
156
|
+
bioVideoUrl: this.bioVideoUrl
|
|
61
157
|
};
|
|
62
158
|
}
|
|
159
|
+
static fromPlain(plain) {
|
|
160
|
+
return (0, class_transformer_1.plainToClass)(SalesAgentCreateDTO, plain);
|
|
161
|
+
}
|
|
162
|
+
toPlain() {
|
|
163
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
164
|
+
}
|
|
63
165
|
}
|
|
64
166
|
__decorate([
|
|
65
|
-
(0, class_validator_1.
|
|
66
|
-
(0, class_validator_1.IsNumber)(),
|
|
67
|
-
__metadata("design:type", Number)
|
|
68
|
-
], SalesAgentCreateDTO.prototype, "status", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, class_validator_1.IsOptional)(),
|
|
71
|
-
(0, class_validator_1.IsEnum)(Designation),
|
|
167
|
+
(0, class_validator_1.IsString)(),
|
|
72
168
|
__metadata("design:type", String)
|
|
73
|
-
], SalesAgentCreateDTO.prototype, "
|
|
169
|
+
], SalesAgentCreateDTO.prototype, "name", void 0);
|
|
74
170
|
__decorate([
|
|
75
171
|
(0, class_validator_1.IsString)(),
|
|
172
|
+
(0, class_validator_1.IsPhoneNumber)(),
|
|
76
173
|
__metadata("design:type", String)
|
|
77
|
-
], SalesAgentCreateDTO.prototype, "
|
|
174
|
+
], SalesAgentCreateDTO.prototype, "phone", void 0);
|
|
78
175
|
__decorate([
|
|
79
|
-
(0, class_validator_1.IsOptional)(),
|
|
80
176
|
(0, class_validator_1.IsEmail)(),
|
|
81
177
|
__metadata("design:type", String)
|
|
82
178
|
], SalesAgentCreateDTO.prototype, "email", void 0);
|
|
83
179
|
__decorate([
|
|
84
180
|
(0, class_validator_1.IsString)(),
|
|
181
|
+
(0, class_validator_1.IsOptional)(),
|
|
85
182
|
__metadata("design:type", String)
|
|
86
|
-
], SalesAgentCreateDTO.prototype, "
|
|
183
|
+
], SalesAgentCreateDTO.prototype, "photo", void 0);
|
|
87
184
|
__decorate([
|
|
88
|
-
(0, class_validator_1.IsOptional)(),
|
|
89
185
|
(0, class_validator_1.IsString)(),
|
|
186
|
+
(0, class_validator_1.IsOptional)(),
|
|
90
187
|
__metadata("design:type", String)
|
|
91
188
|
], SalesAgentCreateDTO.prototype, "agentIntro", void 0);
|
|
92
189
|
__decorate([
|
|
190
|
+
(0, class_validator_1.IsString)(),
|
|
93
191
|
(0, class_validator_1.IsOptional)(),
|
|
94
|
-
(
|
|
95
|
-
|
|
96
|
-
__metadata("design:type", Array)
|
|
97
|
-
], SalesAgentCreateDTO.prototype, "languageIds", void 0);
|
|
192
|
+
__metadata("design:type", String)
|
|
193
|
+
], SalesAgentCreateDTO.prototype, "bioVideoUrl", void 0);
|
|
98
194
|
__decorate([
|
|
195
|
+
(0, class_validator_1.IsNumber)(),
|
|
99
196
|
(0, class_validator_1.IsOptional)(),
|
|
100
|
-
(
|
|
197
|
+
__metadata("design:type", Number)
|
|
198
|
+
], SalesAgentCreateDTO.prototype, "status", void 0);
|
|
199
|
+
__decorate([
|
|
200
|
+
(0, class_validator_1.IsEnum)(Designation),
|
|
101
201
|
__metadata("design:type", String)
|
|
102
|
-
], SalesAgentCreateDTO.prototype, "
|
|
202
|
+
], SalesAgentCreateDTO.prototype, "designation", void 0);
|
|
203
|
+
__decorate([
|
|
204
|
+
(0, class_validator_1.IsArray)(),
|
|
205
|
+
(0, class_validator_1.IsEnum)(Languages, { each: true }),
|
|
206
|
+
__metadata("design:type", Array)
|
|
207
|
+
], SalesAgentCreateDTO.prototype, "languages", void 0);
|
|
103
208
|
exports.SalesAgentCreateDTO = SalesAgentCreateDTO;
|
|
104
209
|
class SalesAgentUpdateDTO {
|
|
105
210
|
validate() {
|
|
106
211
|
const errors = (0, class_validator_1.validateSync)(this);
|
|
107
212
|
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
108
213
|
}
|
|
109
|
-
static fromPlain(plain) {
|
|
110
|
-
return (0, class_transformer_1.plainToClass)(SalesAgentUpdateDTO, plain);
|
|
111
|
-
}
|
|
112
214
|
toUserDTO() {
|
|
113
|
-
const userDto = new
|
|
215
|
+
const userDto = new common_modules_1.UserUpdateDTO();
|
|
114
216
|
if (this.name)
|
|
115
217
|
userDto.name = this.name;
|
|
116
218
|
if (this.email)
|
|
@@ -127,24 +229,42 @@ class SalesAgentUpdateDTO {
|
|
|
127
229
|
salesAgentData.status = this.status;
|
|
128
230
|
if (this.designation)
|
|
129
231
|
salesAgentData.designation = this.designation;
|
|
232
|
+
if (this.languages)
|
|
233
|
+
salesAgentData.languages = this.languages;
|
|
234
|
+
if (this.agentIntro)
|
|
235
|
+
salesAgentData.agentIntro = this.agentIntro;
|
|
236
|
+
if (this.bioVideoUrl)
|
|
237
|
+
salesAgentData.bioVideoUrl = this.bioVideoUrl;
|
|
130
238
|
return salesAgentData;
|
|
131
239
|
}
|
|
240
|
+
static fromPlain(plain) {
|
|
241
|
+
return (0, class_transformer_1.plainToClass)(SalesAgentUpdateDTO, plain);
|
|
242
|
+
}
|
|
243
|
+
toPlain() {
|
|
244
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
245
|
+
}
|
|
132
246
|
}
|
|
133
247
|
__decorate([
|
|
134
248
|
(0, class_validator_1.IsOptional)(),
|
|
135
|
-
(0, class_validator_1.
|
|
249
|
+
(0, class_validator_1.IsString)(),
|
|
136
250
|
__metadata("design:type", String)
|
|
137
|
-
], SalesAgentUpdateDTO.prototype, "
|
|
251
|
+
], SalesAgentUpdateDTO.prototype, "name", void 0);
|
|
138
252
|
__decorate([
|
|
139
253
|
(0, class_validator_1.IsOptional)(),
|
|
140
|
-
(0, class_validator_1.
|
|
141
|
-
|
|
142
|
-
|
|
254
|
+
(0, class_validator_1.IsString)(),
|
|
255
|
+
(0, class_validator_1.IsPhoneNumber)(),
|
|
256
|
+
__metadata("design:type", String)
|
|
257
|
+
], SalesAgentUpdateDTO.prototype, "phone", void 0);
|
|
143
258
|
__decorate([
|
|
144
259
|
(0, class_validator_1.IsOptional)(),
|
|
145
|
-
(0, class_validator_1.
|
|
260
|
+
(0, class_validator_1.IsEmail)(),
|
|
146
261
|
__metadata("design:type", String)
|
|
147
|
-
], SalesAgentUpdateDTO.prototype, "
|
|
262
|
+
], SalesAgentUpdateDTO.prototype, "email", void 0);
|
|
263
|
+
__decorate([
|
|
264
|
+
(0, class_validator_1.IsOptional)(),
|
|
265
|
+
(0, class_validator_1.IsString)(),
|
|
266
|
+
__metadata("design:type", String)
|
|
267
|
+
], SalesAgentUpdateDTO.prototype, "photo", void 0);
|
|
148
268
|
__decorate([
|
|
149
269
|
(0, class_validator_1.IsOptional)(),
|
|
150
270
|
(0, class_validator_1.IsString)(),
|
|
@@ -154,26 +274,26 @@ __decorate([
|
|
|
154
274
|
(0, class_validator_1.IsOptional)(),
|
|
155
275
|
(0, class_validator_1.IsString)(),
|
|
156
276
|
__metadata("design:type", String)
|
|
157
|
-
], SalesAgentUpdateDTO.prototype, "
|
|
277
|
+
], SalesAgentUpdateDTO.prototype, "bioVideoUrl", void 0);
|
|
158
278
|
__decorate([
|
|
159
279
|
(0, class_validator_1.IsOptional)(),
|
|
160
|
-
(0, class_validator_1.
|
|
161
|
-
(
|
|
162
|
-
|
|
163
|
-
], SalesAgentUpdateDTO.prototype, "languageIds", void 0);
|
|
280
|
+
(0, class_validator_1.IsNumber)(),
|
|
281
|
+
__metadata("design:type", Number)
|
|
282
|
+
], SalesAgentUpdateDTO.prototype, "status", void 0);
|
|
164
283
|
__decorate([
|
|
165
284
|
(0, class_validator_1.IsOptional)(),
|
|
166
|
-
(0, class_validator_1.
|
|
285
|
+
(0, class_validator_1.IsEnum)(Designation),
|
|
167
286
|
__metadata("design:type", String)
|
|
168
|
-
], SalesAgentUpdateDTO.prototype, "
|
|
287
|
+
], SalesAgentUpdateDTO.prototype, "designation", void 0);
|
|
169
288
|
__decorate([
|
|
170
289
|
(0, class_validator_1.IsOptional)(),
|
|
171
|
-
(0, class_validator_1.
|
|
172
|
-
|
|
173
|
-
|
|
290
|
+
(0, class_validator_1.IsArray)(),
|
|
291
|
+
(0, class_validator_1.IsEnum)(Languages, { each: true }),
|
|
292
|
+
__metadata("design:type", Array)
|
|
293
|
+
], SalesAgentUpdateDTO.prototype, "languages", void 0);
|
|
174
294
|
__decorate([
|
|
175
295
|
(0, class_validator_1.IsOptional)(),
|
|
176
|
-
(0, class_validator_1.
|
|
177
|
-
__metadata("design:type",
|
|
178
|
-
], SalesAgentUpdateDTO.prototype, "
|
|
296
|
+
(0, class_validator_1.IsBoolean)(),
|
|
297
|
+
__metadata("design:type", Boolean)
|
|
298
|
+
], SalesAgentUpdateDTO.prototype, "isActive", void 0);
|
|
179
299
|
exports.SalesAgentUpdateDTO = SalesAgentUpdateDTO;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ValidatorConstraintInterface, ValidationArguments } from "class-validator";
|
|
2
2
|
import { PaginationOptions } from "../../../../global";
|
|
3
|
+
import { VisitPurpose } from "../enums";
|
|
3
4
|
export declare class IsTimeConstraint implements ValidatorConstraintInterface {
|
|
4
5
|
validate(time: string, args: ValidationArguments): boolean;
|
|
5
6
|
defaultMessage(args: ValidationArguments): string;
|
|
@@ -9,7 +10,7 @@ export declare class ShowroomVisitCreateDTO {
|
|
|
9
10
|
Visitor_Mobile: string;
|
|
10
11
|
Visit_Date: string;
|
|
11
12
|
Visit_Time: string;
|
|
12
|
-
Visit_Interest:
|
|
13
|
+
Visit_Interest: VisitPurpose;
|
|
13
14
|
Interested_Cars?: string[];
|
|
14
15
|
AssignedAgentId?: string;
|
|
15
16
|
validate(): string[];
|
|
@@ -21,7 +22,7 @@ export declare class ShowroomVisitUpdateDTO {
|
|
|
21
22
|
Visitor_Mobile?: string;
|
|
22
23
|
Visit_Date?: string;
|
|
23
24
|
Visit_Time?: string;
|
|
24
|
-
Visit_Interest?:
|
|
25
|
+
Visit_Interest?: VisitPurpose;
|
|
25
26
|
Interested_Cars?: string[];
|
|
26
27
|
AssignedAgentId?: string;
|
|
27
28
|
validate(): string[];
|
|
@@ -33,7 +34,7 @@ export declare class ShowroomVisitResponseDTO {
|
|
|
33
34
|
Visitor_Mobile: string;
|
|
34
35
|
Visit_Date: string;
|
|
35
36
|
Visit_Time: string;
|
|
36
|
-
Visit_Interest:
|
|
37
|
+
Visit_Interest: VisitPurpose;
|
|
37
38
|
Interested_Cars?: string[];
|
|
38
39
|
AssignedAgentId?: string;
|
|
39
40
|
AssignedAgentName?: string;
|
|
@@ -63,10 +64,3 @@ export declare class ShowRoomVisitFetchDTO {
|
|
|
63
64
|
static fromPlain(plain: Record<string, unknown>): ShowRoomVisitFetchDTO;
|
|
64
65
|
toPlain(): Record<string, unknown>;
|
|
65
66
|
}
|
|
66
|
-
export declare enum VisitStatus {
|
|
67
|
-
SCHEDULED = "SCHEDULED",
|
|
68
|
-
IN_PROGRESS = "IN_PROGRESS",
|
|
69
|
-
COMPLETED = "COMPLETED",
|
|
70
|
-
CANCELLED = "CANCELLED",
|
|
71
|
-
NO_SHOW = "NO_SHOW"
|
|
72
|
-
}
|
|
@@ -9,10 +9,11 @@ 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.ShowRoomVisitFetchDTO = exports.ShowRoomVisitFilterDTO = exports.ShowRoomVisitOptionsDTO = exports.ShowroomVisitResponseDTO = exports.ShowroomVisitUpdateDTO = exports.ShowroomVisitCreateDTO = exports.IsTimeConstraint = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const global_1 = require("../../../../global");
|
|
16
|
+
const enums_1 = require("../enums");
|
|
16
17
|
// Custom time format validator
|
|
17
18
|
let IsTimeConstraint = class IsTimeConstraint {
|
|
18
19
|
validate(time, args) {
|
|
@@ -234,12 +235,3 @@ class ShowRoomVisitFetchDTO {
|
|
|
234
235
|
}
|
|
235
236
|
}
|
|
236
237
|
exports.ShowRoomVisitFetchDTO = ShowRoomVisitFetchDTO;
|
|
237
|
-
// Optional: Create an enum for visit status if needed
|
|
238
|
-
var VisitStatus;
|
|
239
|
-
(function (VisitStatus) {
|
|
240
|
-
VisitStatus["SCHEDULED"] = "SCHEDULED";
|
|
241
|
-
VisitStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
242
|
-
VisitStatus["COMPLETED"] = "COMPLETED";
|
|
243
|
-
VisitStatus["CANCELLED"] = "CANCELLED";
|
|
244
|
-
VisitStatus["NO_SHOW"] = "NO_SHOW";
|
|
245
|
-
})(VisitStatus = exports.VisitStatus || (exports.VisitStatus = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum VisitStatus {
|
|
2
|
+
SCHEDULED = "SCHEDULED",
|
|
3
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
4
|
+
COMPLETED = "COMPLETED",
|
|
5
|
+
CANCELLED = "CANCELLED",
|
|
6
|
+
NO_SHOW = "NO_SHOW"
|
|
7
|
+
}
|
|
8
|
+
export declare enum VisitPurpose {
|
|
9
|
+
CAR_VIEWING = "CAR_VIEWING",
|
|
10
|
+
SELL_MY_CAR = "SELL_MY_CAR"
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VisitPurpose = exports.VisitStatus = void 0;
|
|
4
|
+
// Optional: Create an enum for visit status if needed
|
|
5
|
+
var VisitStatus;
|
|
6
|
+
(function (VisitStatus) {
|
|
7
|
+
VisitStatus["SCHEDULED"] = "SCHEDULED";
|
|
8
|
+
VisitStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
9
|
+
VisitStatus["COMPLETED"] = "COMPLETED";
|
|
10
|
+
VisitStatus["CANCELLED"] = "CANCELLED";
|
|
11
|
+
VisitStatus["NO_SHOW"] = "NO_SHOW";
|
|
12
|
+
})(VisitStatus = exports.VisitStatus || (exports.VisitStatus = {}));
|
|
13
|
+
var VisitPurpose;
|
|
14
|
+
(function (VisitPurpose) {
|
|
15
|
+
VisitPurpose["CAR_VIEWING"] = "CAR_VIEWING";
|
|
16
|
+
VisitPurpose["SELL_MY_CAR"] = "SELL_MY_CAR";
|
|
17
|
+
})(VisitPurpose = exports.VisitPurpose || (exports.VisitPurpose = {}));
|
|
@@ -43,12 +43,6 @@ export declare class VehicleFinanceUpdateDTO {
|
|
|
43
43
|
monthlyInstallment?: number;
|
|
44
44
|
financingYear?: number;
|
|
45
45
|
interestPerYear?: number;
|
|
46
|
-
totalReductionAmount?: number;
|
|
47
|
-
reductionDuration?: number;
|
|
48
|
-
durationShow?: string;
|
|
49
|
-
reductionInterval?: number;
|
|
50
|
-
minimumBidAmount?: number;
|
|
51
|
-
initialDepositAmount?: number;
|
|
52
46
|
vehiclePriceType?: string;
|
|
53
47
|
vatInclusive?: string;
|
|
54
48
|
validate(): string[];
|
|
@@ -140,36 +140,6 @@ __decorate([
|
|
|
140
140
|
(0, class_validator_1.IsNumber)(),
|
|
141
141
|
__metadata("design:type", Number)
|
|
142
142
|
], VehicleFinanceUpdateDTO.prototype, "interestPerYear", void 0);
|
|
143
|
-
__decorate([
|
|
144
|
-
(0, class_validator_1.IsOptional)(),
|
|
145
|
-
(0, class_validator_1.IsNumber)(),
|
|
146
|
-
__metadata("design:type", Number)
|
|
147
|
-
], VehicleFinanceUpdateDTO.prototype, "totalReductionAmount", void 0);
|
|
148
|
-
__decorate([
|
|
149
|
-
(0, class_validator_1.IsOptional)(),
|
|
150
|
-
(0, class_validator_1.IsNumber)(),
|
|
151
|
-
__metadata("design:type", Number)
|
|
152
|
-
], VehicleFinanceUpdateDTO.prototype, "reductionDuration", void 0);
|
|
153
|
-
__decorate([
|
|
154
|
-
(0, class_validator_1.IsOptional)(),
|
|
155
|
-
(0, class_validator_1.IsString)(),
|
|
156
|
-
__metadata("design:type", String)
|
|
157
|
-
], VehicleFinanceUpdateDTO.prototype, "durationShow", void 0);
|
|
158
|
-
__decorate([
|
|
159
|
-
(0, class_validator_1.IsOptional)(),
|
|
160
|
-
(0, class_validator_1.IsNumber)(),
|
|
161
|
-
__metadata("design:type", Number)
|
|
162
|
-
], VehicleFinanceUpdateDTO.prototype, "reductionInterval", void 0);
|
|
163
|
-
__decorate([
|
|
164
|
-
(0, class_validator_1.IsOptional)(),
|
|
165
|
-
(0, class_validator_1.IsNumber)(),
|
|
166
|
-
__metadata("design:type", Number)
|
|
167
|
-
], VehicleFinanceUpdateDTO.prototype, "minimumBidAmount", void 0);
|
|
168
|
-
__decorate([
|
|
169
|
-
(0, class_validator_1.IsOptional)(),
|
|
170
|
-
(0, class_validator_1.IsNumber)(),
|
|
171
|
-
__metadata("design:type", Number)
|
|
172
|
-
], VehicleFinanceUpdateDTO.prototype, "initialDepositAmount", void 0);
|
|
173
143
|
__decorate([
|
|
174
144
|
(0, class_validator_1.IsOptional)(),
|
|
175
145
|
(0, class_validator_1.IsString)(),
|
package/package.json
CHANGED