@alba-cars/common-modules 1.2.7 → 1.2.8
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/error-handling/errorHandler.d.ts +1 -1
- package/dist/core/error-handling/errorHandler.js +36 -10
- package/dist/core/models/index.d.ts +1 -0
- package/dist/core/models/index.js +1 -0
- package/dist/core/models/media/index.d.ts +1 -0
- package/dist/core/models/media/index.js +17 -0
- package/dist/core/models/media/media_data.d.ts +4 -0
- package/dist/core/models/media/media_data.js +2 -0
- package/dist/core/network/endpoint-config.d.ts +8 -1
- package/dist/core/network/endpoint-config.js +55 -6
- package/dist/core/network/fetch-api.js +24 -20
- package/dist/core/utils/global_validators.d.ts +2 -0
- package/dist/core/utils/global_validators.js +20 -0
- package/dist/core/utils/index.d.ts +1 -0
- package/dist/core/utils/index.js +1 -0
- package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.d.ts +92 -0
- package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.js +286 -0
- package/dist/features/finance-eligibilty-request/data/index.d.ts +1 -0
- package/dist/features/finance-eligibilty-request/data/index.js +17 -0
- package/dist/features/finance-eligibilty-request/index.d.ts +1 -0
- package/dist/features/finance-eligibilty-request/index.js +17 -0
- package/dist/features/index.d.ts +7 -5
- package/dist/features/index.js +2 -0
- package/dist/features/sell-call-request/data/dto/SellCarRequestDTO.d.ts +134 -0
- package/dist/features/sell-call-request/data/dto/SellCarRequestDTO.js +394 -0
- package/dist/features/sell-call-request/data/index.d.ts +1 -0
- package/dist/features/sell-call-request/data/index.js +17 -0
- package/dist/features/sell-call-request/index.d.ts +1 -0
- package/dist/features/sell-call-request/index.js +17 -0
- package/dist/features/showroom-visit/data/dto/ShowroomVisit.d.ts +27 -2
- package/dist/features/showroom-visit/data/dto/ShowroomVisit.js +86 -5
- package/dist/features/test-drive-request/data/dto/TestDriveRequestDTO.d.ts +9 -6
- package/dist/features/test-drive-request/data/dto/TestDriveRequestDTO.js +16 -3
- package/dist/features/vehicle/data/dto/MediaDTO.d.ts +5 -0
- package/dist/features/vehicle/data/dto/MediaDTO.js +2 -0
- package/dist/features/vehicle/data/dto/VehicleCategoryDTO.d.ts +39 -0
- package/dist/features/vehicle/data/dto/VehicleCategoryDTO.js +114 -0
- package/dist/features/vehicle/data/dto/VehicleDTO.d.ts +16 -8
- package/dist/features/vehicle/data/dto/VehicleDTO.js +43 -6
- package/dist/features/vehicle/data/dto/VehicleFilterDTO.d.ts +230 -0
- package/dist/features/vehicle/data/dto/VehicleFilterDTO.js +705 -0
- package/dist/features/vehicle/data/dto/VehicleFinanceDTO.d.ts +23 -12
- package/dist/features/vehicle/data/dto/VehicleFinanceDTO.js +41 -1
- package/dist/features/vehicle/data/dto/VehicleInspectionDTO.d.ts +147 -0
- package/dist/features/vehicle/data/dto/VehicleInspectionDTO.js +765 -0
- package/dist/features/vehicle/data/dto/VehicleMedia.d.ts +14 -0
- package/dist/features/vehicle/data/dto/VehicleMedia.js +29 -4
- package/dist/features/vehicle/data/dto/VehicleModelDTO.d.ts +5 -5
- package/dist/features/vehicle/data/dto/VehicleModelDTO.js +7 -7
- package/dist/features/vehicle/data/dto/VehicleTypeDTO.d.ts +1 -1
- package/dist/features/vehicle/data/dto/VehicleTypeDTO.js +1 -1
- package/dist/features/vehicle/data/dto/index.d.ts +5 -0
- package/dist/features/vehicle/data/dto/index.js +5 -0
- package/dist/features/vehicle/data/index.d.ts +0 -1
- package/dist/features/vehicle/data/index.js +1 -1
- package/dist/features/vehicle/data/models/VehicleFeature.d.ts +1 -0
- package/dist/features/vehicle/data/models/VehicleFeatureCategory.d.ts +1 -0
- package/dist/features/vehicle/data/models/VehicleFinance.d.ts +3 -0
- package/dist/features/vehicle/data/utilities.d.ts +32 -6
- package/dist/features/vehicle/data/utilities.js +1222 -19
- package/dist/global/utilities.d.ts +4 -0
- package/dist/global/utilities.js +3 -1
- package/package.json +2 -1
|
@@ -0,0 +1,394 @@
|
|
|
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.SellCarRequestResponseDTO = exports.SellCarRequestUpdateDTO = exports.SellCarRequestCreateDTO = exports.RequestType = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
var RequestType;
|
|
16
|
+
(function (RequestType) {
|
|
17
|
+
RequestType["SELL"] = "sell";
|
|
18
|
+
RequestType["TRADE_IN"] = "trade_in";
|
|
19
|
+
})(RequestType = exports.RequestType || (exports.RequestType = {}));
|
|
20
|
+
class SellCarRequestCreateDTO {
|
|
21
|
+
validate() {
|
|
22
|
+
const errors = (0, class_validator_1.validateSync)(this);
|
|
23
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
24
|
+
}
|
|
25
|
+
static fromPlain(plain) {
|
|
26
|
+
const requestType = plain.desiredVehicleId
|
|
27
|
+
? RequestType.TRADE_IN
|
|
28
|
+
: RequestType.SELL;
|
|
29
|
+
return (0, class_transformer_1.plainToClass)(SellCarRequestCreateDTO, { ...plain, requestType });
|
|
30
|
+
}
|
|
31
|
+
toPlain() {
|
|
32
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsString)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], SellCarRequestCreateDTO.prototype, "name", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsPhoneNumber)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], SellCarRequestCreateDTO.prototype, "phone", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsEmail)(),
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], SellCarRequestCreateDTO.prototype, "email", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsString)(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], SellCarRequestCreateDTO.prototype, "city", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsEnum)(RequestType),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], SellCarRequestCreateDTO.prototype, "requestType", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsUUID)(),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], SellCarRequestCreateDTO.prototype, "makeId", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_validator_1.IsUUID)(),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], SellCarRequestCreateDTO.prototype, "modelId", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_validator_1.IsNumber)(),
|
|
66
|
+
(0, class_validator_1.IsPositive)(),
|
|
67
|
+
__metadata("design:type", Number)
|
|
68
|
+
], SellCarRequestCreateDTO.prototype, "year", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsNumber)(),
|
|
71
|
+
(0, class_validator_1.IsPositive)(),
|
|
72
|
+
__metadata("design:type", Number)
|
|
73
|
+
], SellCarRequestCreateDTO.prototype, "mileage", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_validator_1.IsNumber)(),
|
|
76
|
+
(0, class_validator_1.IsPositive)(),
|
|
77
|
+
(0, class_validator_1.ValidateIf)((o) => o.requestType === RequestType.SELL),
|
|
78
|
+
(0, class_validator_1.IsOptional)(),
|
|
79
|
+
__metadata("design:type", Number)
|
|
80
|
+
], SellCarRequestCreateDTO.prototype, "expectedSellingPrice", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, class_validator_1.IsString)(),
|
|
83
|
+
(0, class_validator_1.ValidateIf)((o) => o.requestType === RequestType.SELL),
|
|
84
|
+
(0, class_validator_1.IsOptional)(),
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], SellCarRequestCreateDTO.prototype, "vehicleOptions", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, class_validator_1.IsString)(),
|
|
89
|
+
(0, class_validator_1.ValidateIf)((o) => o.requestType === RequestType.SELL),
|
|
90
|
+
(0, class_validator_1.IsOptional)(),
|
|
91
|
+
__metadata("design:type", String)
|
|
92
|
+
], SellCarRequestCreateDTO.prototype, "specification", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, class_validator_1.IsArray)(),
|
|
95
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
96
|
+
(0, class_validator_1.ValidateIf)((o) => o.requestType === RequestType.SELL),
|
|
97
|
+
(0, class_validator_1.IsOptional)(),
|
|
98
|
+
__metadata("design:type", Array)
|
|
99
|
+
], SellCarRequestCreateDTO.prototype, "images", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, class_validator_1.IsUUID)(),
|
|
102
|
+
(0, class_validator_1.ValidateIf)((o) => o.requestType === RequestType.TRADE_IN),
|
|
103
|
+
(0, class_validator_1.IsOptional)(),
|
|
104
|
+
__metadata("design:type", String)
|
|
105
|
+
], SellCarRequestCreateDTO.prototype, "desiredVehicleId", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, class_validator_1.IsString)(),
|
|
108
|
+
(0, class_validator_1.IsOptional)(),
|
|
109
|
+
__metadata("design:type", String)
|
|
110
|
+
], SellCarRequestCreateDTO.prototype, "color", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, class_validator_1.IsString)(),
|
|
113
|
+
(0, class_validator_1.IsOptional)(),
|
|
114
|
+
__metadata("design:type", String)
|
|
115
|
+
], SellCarRequestCreateDTO.prototype, "transmission", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, class_validator_1.IsString)(),
|
|
118
|
+
(0, class_validator_1.IsOptional)(),
|
|
119
|
+
__metadata("design:type", String)
|
|
120
|
+
], SellCarRequestCreateDTO.prototype, "condition", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, class_validator_1.IsString)(),
|
|
123
|
+
(0, class_validator_1.IsOptional)(),
|
|
124
|
+
__metadata("design:type", String)
|
|
125
|
+
], SellCarRequestCreateDTO.prototype, "fuelType", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, class_validator_1.IsString)(),
|
|
128
|
+
(0, class_validator_1.IsOptional)(),
|
|
129
|
+
__metadata("design:type", String)
|
|
130
|
+
], SellCarRequestCreateDTO.prototype, "engineCapacity", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, class_validator_1.IsString)(),
|
|
133
|
+
(0, class_validator_1.IsOptional)(),
|
|
134
|
+
__metadata("design:type", String)
|
|
135
|
+
], SellCarRequestCreateDTO.prototype, "description", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
(0, class_validator_1.IsOptional)(),
|
|
138
|
+
__metadata("design:type", Object)
|
|
139
|
+
], SellCarRequestCreateDTO.prototype, "additionalDetails", void 0);
|
|
140
|
+
exports.SellCarRequestCreateDTO = SellCarRequestCreateDTO;
|
|
141
|
+
class SellCarRequestUpdateDTO {
|
|
142
|
+
validate() {
|
|
143
|
+
const errors = (0, class_validator_1.validateSync)(this);
|
|
144
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
145
|
+
}
|
|
146
|
+
static fromPlain(plain) {
|
|
147
|
+
return (0, class_transformer_1.plainToClass)(SellCarRequestUpdateDTO, plain);
|
|
148
|
+
}
|
|
149
|
+
toPlain() {
|
|
150
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, class_validator_1.IsOptional)(),
|
|
155
|
+
(0, class_validator_1.IsString)(),
|
|
156
|
+
__metadata("design:type", String)
|
|
157
|
+
], SellCarRequestUpdateDTO.prototype, "name", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
(0, class_validator_1.IsOptional)(),
|
|
160
|
+
(0, class_validator_1.IsPhoneNumber)(),
|
|
161
|
+
__metadata("design:type", String)
|
|
162
|
+
], SellCarRequestUpdateDTO.prototype, "phone", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, class_validator_1.IsOptional)(),
|
|
165
|
+
(0, class_validator_1.IsEmail)(),
|
|
166
|
+
__metadata("design:type", String)
|
|
167
|
+
], SellCarRequestUpdateDTO.prototype, "email", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, class_validator_1.IsOptional)(),
|
|
170
|
+
(0, class_validator_1.IsString)(),
|
|
171
|
+
__metadata("design:type", String)
|
|
172
|
+
], SellCarRequestUpdateDTO.prototype, "city", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
(0, class_validator_1.IsOptional)(),
|
|
175
|
+
(0, class_validator_1.IsEnum)(RequestType),
|
|
176
|
+
__metadata("design:type", String)
|
|
177
|
+
], SellCarRequestUpdateDTO.prototype, "requestType", void 0);
|
|
178
|
+
__decorate([
|
|
179
|
+
(0, class_validator_1.IsOptional)(),
|
|
180
|
+
(0, class_validator_1.IsUUID)(),
|
|
181
|
+
__metadata("design:type", String)
|
|
182
|
+
], SellCarRequestUpdateDTO.prototype, "makeId", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
(0, class_validator_1.IsOptional)(),
|
|
185
|
+
(0, class_validator_1.IsUUID)(),
|
|
186
|
+
__metadata("design:type", String)
|
|
187
|
+
], SellCarRequestUpdateDTO.prototype, "modelId", void 0);
|
|
188
|
+
__decorate([
|
|
189
|
+
(0, class_validator_1.IsOptional)(),
|
|
190
|
+
(0, class_validator_1.IsNumber)(),
|
|
191
|
+
(0, class_validator_1.IsPositive)(),
|
|
192
|
+
__metadata("design:type", Number)
|
|
193
|
+
], SellCarRequestUpdateDTO.prototype, "year", void 0);
|
|
194
|
+
__decorate([
|
|
195
|
+
(0, class_validator_1.IsOptional)(),
|
|
196
|
+
(0, class_validator_1.IsNumber)(),
|
|
197
|
+
(0, class_validator_1.IsPositive)(),
|
|
198
|
+
__metadata("design:type", Number)
|
|
199
|
+
], SellCarRequestUpdateDTO.prototype, "mileage", void 0);
|
|
200
|
+
__decorate([
|
|
201
|
+
(0, class_validator_1.IsOptional)(),
|
|
202
|
+
(0, class_validator_1.IsNumber)(),
|
|
203
|
+
(0, class_validator_1.IsPositive)(),
|
|
204
|
+
__metadata("design:type", Number)
|
|
205
|
+
], SellCarRequestUpdateDTO.prototype, "expectedSellingPrice", void 0);
|
|
206
|
+
__decorate([
|
|
207
|
+
(0, class_validator_1.IsOptional)(),
|
|
208
|
+
(0, class_validator_1.IsString)(),
|
|
209
|
+
__metadata("design:type", String)
|
|
210
|
+
], SellCarRequestUpdateDTO.prototype, "vehicleOptions", void 0);
|
|
211
|
+
__decorate([
|
|
212
|
+
(0, class_validator_1.IsOptional)(),
|
|
213
|
+
(0, class_validator_1.IsString)(),
|
|
214
|
+
__metadata("design:type", String)
|
|
215
|
+
], SellCarRequestUpdateDTO.prototype, "specification", void 0);
|
|
216
|
+
__decorate([
|
|
217
|
+
(0, class_validator_1.IsString)(),
|
|
218
|
+
(0, class_validator_1.IsOptional)(),
|
|
219
|
+
__metadata("design:type", String)
|
|
220
|
+
], SellCarRequestUpdateDTO.prototype, "condition", void 0);
|
|
221
|
+
__decorate([
|
|
222
|
+
(0, class_validator_1.IsOptional)(),
|
|
223
|
+
(0, class_validator_1.IsArray)(),
|
|
224
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
225
|
+
__metadata("design:type", Array)
|
|
226
|
+
], SellCarRequestUpdateDTO.prototype, "images", void 0);
|
|
227
|
+
__decorate([
|
|
228
|
+
(0, class_validator_1.IsOptional)(),
|
|
229
|
+
(0, class_validator_1.IsUUID)(),
|
|
230
|
+
__metadata("design:type", String)
|
|
231
|
+
], SellCarRequestUpdateDTO.prototype, "desiredVehicleId", void 0);
|
|
232
|
+
__decorate([
|
|
233
|
+
(0, class_validator_1.IsOptional)(),
|
|
234
|
+
(0, class_validator_1.IsString)(),
|
|
235
|
+
__metadata("design:type", String)
|
|
236
|
+
], SellCarRequestUpdateDTO.prototype, "color", void 0);
|
|
237
|
+
__decorate([
|
|
238
|
+
(0, class_validator_1.IsOptional)(),
|
|
239
|
+
(0, class_validator_1.IsString)(),
|
|
240
|
+
__metadata("design:type", String)
|
|
241
|
+
], SellCarRequestUpdateDTO.prototype, "transmission", void 0);
|
|
242
|
+
__decorate([
|
|
243
|
+
(0, class_validator_1.IsOptional)(),
|
|
244
|
+
(0, class_validator_1.IsString)(),
|
|
245
|
+
__metadata("design:type", String)
|
|
246
|
+
], SellCarRequestUpdateDTO.prototype, "fuelType", void 0);
|
|
247
|
+
__decorate([
|
|
248
|
+
(0, class_validator_1.IsOptional)(),
|
|
249
|
+
(0, class_validator_1.IsString)(),
|
|
250
|
+
__metadata("design:type", String)
|
|
251
|
+
], SellCarRequestUpdateDTO.prototype, "engineCapacity", void 0);
|
|
252
|
+
__decorate([
|
|
253
|
+
(0, class_validator_1.IsOptional)(),
|
|
254
|
+
(0, class_validator_1.IsString)(),
|
|
255
|
+
__metadata("design:type", String)
|
|
256
|
+
], SellCarRequestUpdateDTO.prototype, "description", void 0);
|
|
257
|
+
__decorate([
|
|
258
|
+
(0, class_validator_1.IsOptional)(),
|
|
259
|
+
(0, class_validator_1.IsEnum)([
|
|
260
|
+
"pending",
|
|
261
|
+
"inspection_scheduled",
|
|
262
|
+
"inspected",
|
|
263
|
+
"valued",
|
|
264
|
+
"approved",
|
|
265
|
+
"rejected",
|
|
266
|
+
"completed",
|
|
267
|
+
]),
|
|
268
|
+
__metadata("design:type", String)
|
|
269
|
+
], SellCarRequestUpdateDTO.prototype, "status", void 0);
|
|
270
|
+
__decorate([
|
|
271
|
+
(0, class_validator_1.IsOptional)(),
|
|
272
|
+
__metadata("design:type", Object)
|
|
273
|
+
], SellCarRequestUpdateDTO.prototype, "additionalDetails", void 0);
|
|
274
|
+
exports.SellCarRequestUpdateDTO = SellCarRequestUpdateDTO;
|
|
275
|
+
class SellCarRequestResponseDTO {
|
|
276
|
+
validate() {
|
|
277
|
+
const errors = (0, class_validator_1.validateSync)(this);
|
|
278
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
279
|
+
}
|
|
280
|
+
static fromPlain(plain) {
|
|
281
|
+
return (0, class_transformer_1.plainToClass)(SellCarRequestResponseDTO, plain);
|
|
282
|
+
}
|
|
283
|
+
toPlain() {
|
|
284
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
__decorate([
|
|
288
|
+
(0, class_validator_1.IsString)(),
|
|
289
|
+
__metadata("design:type", String)
|
|
290
|
+
], SellCarRequestResponseDTO.prototype, "id", void 0);
|
|
291
|
+
__decorate([
|
|
292
|
+
(0, class_validator_1.IsString)(),
|
|
293
|
+
__metadata("design:type", String)
|
|
294
|
+
], SellCarRequestResponseDTO.prototype, "name", void 0);
|
|
295
|
+
__decorate([
|
|
296
|
+
(0, class_validator_1.IsPhoneNumber)(),
|
|
297
|
+
__metadata("design:type", String)
|
|
298
|
+
], SellCarRequestResponseDTO.prototype, "phone", void 0);
|
|
299
|
+
__decorate([
|
|
300
|
+
(0, class_validator_1.IsEmail)(),
|
|
301
|
+
(0, class_validator_1.IsOptional)(),
|
|
302
|
+
__metadata("design:type", String)
|
|
303
|
+
], SellCarRequestResponseDTO.prototype, "email", void 0);
|
|
304
|
+
__decorate([
|
|
305
|
+
(0, class_validator_1.IsString)(),
|
|
306
|
+
__metadata("design:type", String)
|
|
307
|
+
], SellCarRequestResponseDTO.prototype, "city", void 0);
|
|
308
|
+
__decorate([
|
|
309
|
+
(0, class_validator_1.IsEnum)(RequestType),
|
|
310
|
+
__metadata("design:type", String)
|
|
311
|
+
], SellCarRequestResponseDTO.prototype, "requestType", void 0);
|
|
312
|
+
__decorate([
|
|
313
|
+
(0, class_validator_1.IsNumber)(),
|
|
314
|
+
(0, class_validator_1.IsOptional)(),
|
|
315
|
+
__metadata("design:type", Number)
|
|
316
|
+
], SellCarRequestResponseDTO.prototype, "year", void 0);
|
|
317
|
+
__decorate([
|
|
318
|
+
(0, class_validator_1.IsNumber)(),
|
|
319
|
+
(0, class_validator_1.IsOptional)(),
|
|
320
|
+
__metadata("design:type", Number)
|
|
321
|
+
], SellCarRequestResponseDTO.prototype, "mileage", void 0);
|
|
322
|
+
__decorate([
|
|
323
|
+
(0, class_validator_1.IsNumber)(),
|
|
324
|
+
(0, class_validator_1.IsOptional)(),
|
|
325
|
+
__metadata("design:type", Number)
|
|
326
|
+
], SellCarRequestResponseDTO.prototype, "expectedSellingPrice", void 0);
|
|
327
|
+
__decorate([
|
|
328
|
+
(0, class_validator_1.IsString)(),
|
|
329
|
+
(0, class_validator_1.IsOptional)(),
|
|
330
|
+
__metadata("design:type", String)
|
|
331
|
+
], SellCarRequestResponseDTO.prototype, "vehicleOptions", void 0);
|
|
332
|
+
__decorate([
|
|
333
|
+
(0, class_validator_1.IsString)(),
|
|
334
|
+
(0, class_validator_1.IsOptional)(),
|
|
335
|
+
__metadata("design:type", String)
|
|
336
|
+
], SellCarRequestResponseDTO.prototype, "specification", void 0);
|
|
337
|
+
__decorate([
|
|
338
|
+
(0, class_validator_1.IsArray)(),
|
|
339
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
340
|
+
(0, class_validator_1.IsOptional)(),
|
|
341
|
+
__metadata("design:type", Array)
|
|
342
|
+
], SellCarRequestResponseDTO.prototype, "images", void 0);
|
|
343
|
+
__decorate([
|
|
344
|
+
(0, class_validator_1.IsOptional)(),
|
|
345
|
+
__metadata("design:type", Object)
|
|
346
|
+
], SellCarRequestResponseDTO.prototype, "desiredVehicle", void 0);
|
|
347
|
+
__decorate([
|
|
348
|
+
(0, class_validator_1.IsString)(),
|
|
349
|
+
(0, class_validator_1.IsOptional)(),
|
|
350
|
+
__metadata("design:type", String)
|
|
351
|
+
], SellCarRequestResponseDTO.prototype, "color", void 0);
|
|
352
|
+
__decorate([
|
|
353
|
+
(0, class_validator_1.IsString)(),
|
|
354
|
+
(0, class_validator_1.IsOptional)(),
|
|
355
|
+
__metadata("design:type", String)
|
|
356
|
+
], SellCarRequestResponseDTO.prototype, "transmission", void 0);
|
|
357
|
+
__decorate([
|
|
358
|
+
(0, class_validator_1.IsString)(),
|
|
359
|
+
(0, class_validator_1.IsOptional)(),
|
|
360
|
+
__metadata("design:type", String)
|
|
361
|
+
], SellCarRequestResponseDTO.prototype, "condition", void 0);
|
|
362
|
+
__decorate([
|
|
363
|
+
(0, class_validator_1.IsString)(),
|
|
364
|
+
(0, class_validator_1.IsOptional)(),
|
|
365
|
+
__metadata("design:type", String)
|
|
366
|
+
], SellCarRequestResponseDTO.prototype, "fuelType", void 0);
|
|
367
|
+
__decorate([
|
|
368
|
+
(0, class_validator_1.IsString)(),
|
|
369
|
+
(0, class_validator_1.IsOptional)(),
|
|
370
|
+
__metadata("design:type", String)
|
|
371
|
+
], SellCarRequestResponseDTO.prototype, "engineCapacity", void 0);
|
|
372
|
+
__decorate([
|
|
373
|
+
(0, class_validator_1.IsString)(),
|
|
374
|
+
(0, class_validator_1.IsOptional)(),
|
|
375
|
+
__metadata("design:type", String)
|
|
376
|
+
], SellCarRequestResponseDTO.prototype, "description", void 0);
|
|
377
|
+
__decorate([
|
|
378
|
+
(0, class_validator_1.IsString)(),
|
|
379
|
+
(0, class_validator_1.IsEnum)([
|
|
380
|
+
"pending",
|
|
381
|
+
"inspection_scheduled",
|
|
382
|
+
"inspected",
|
|
383
|
+
"valued",
|
|
384
|
+
"approved",
|
|
385
|
+
"rejected",
|
|
386
|
+
"completed",
|
|
387
|
+
]),
|
|
388
|
+
__metadata("design:type", String)
|
|
389
|
+
], SellCarRequestResponseDTO.prototype, "status", void 0);
|
|
390
|
+
__decorate([
|
|
391
|
+
(0, class_validator_1.IsOptional)(),
|
|
392
|
+
__metadata("design:type", Object)
|
|
393
|
+
], SellCarRequestResponseDTO.prototype, "additionalDetails", void 0);
|
|
394
|
+
exports.SellCarRequestResponseDTO = SellCarRequestResponseDTO;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dto/SellCarRequestDTO";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./dto/SellCarRequestDTO"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./data";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./data"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValidatorConstraintInterface, ValidationArguments } from
|
|
1
|
+
import { ValidatorConstraintInterface, ValidationArguments } from "class-validator";
|
|
2
2
|
export declare class IsTimeConstraint implements ValidatorConstraintInterface {
|
|
3
3
|
validate(time: string, args: ValidationArguments): boolean;
|
|
4
4
|
defaultMessage(args: ValidationArguments): string;
|
|
@@ -9,7 +9,7 @@ export declare class ShowroomVisitCreateDTO {
|
|
|
9
9
|
Visit_Date: string;
|
|
10
10
|
Visit_Time: string;
|
|
11
11
|
Visit_Interest: string;
|
|
12
|
-
Interested_Cars
|
|
12
|
+
Interested_Cars?: string[];
|
|
13
13
|
AssignedAgentId?: string;
|
|
14
14
|
validate(): string[];
|
|
15
15
|
static fromPlain(plain: Record<string, unknown>): ShowroomVisitCreateDTO;
|
|
@@ -26,3 +26,28 @@ export declare class ShowroomVisitUpdateDTO {
|
|
|
26
26
|
validate(): string[];
|
|
27
27
|
static fromPlain(plain: Record<string, unknown>): ShowroomVisitUpdateDTO;
|
|
28
28
|
}
|
|
29
|
+
export declare class ShowroomVisitResponseDTO {
|
|
30
|
+
id: string;
|
|
31
|
+
Visitor_FullName: string;
|
|
32
|
+
Visitor_Mobile: string;
|
|
33
|
+
Visit_Date: string;
|
|
34
|
+
Visit_Time: string;
|
|
35
|
+
Visit_Interest: string;
|
|
36
|
+
Interested_Cars?: string[];
|
|
37
|
+
AssignedAgentId?: string;
|
|
38
|
+
AssignedAgentName?: string;
|
|
39
|
+
IsCompleted?: boolean;
|
|
40
|
+
VisitNotes?: string;
|
|
41
|
+
CreatedAt: string;
|
|
42
|
+
UpdatedAt: string;
|
|
43
|
+
validate(): string[];
|
|
44
|
+
static fromPlain(plain: Record<string, unknown>): ShowroomVisitResponseDTO;
|
|
45
|
+
toPlain(): Record<string, unknown>;
|
|
46
|
+
}
|
|
47
|
+
export declare enum VisitStatus {
|
|
48
|
+
SCHEDULED = "SCHEDULED",
|
|
49
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
50
|
+
COMPLETED = "COMPLETED",
|
|
51
|
+
CANCELLED = "CANCELLED",
|
|
52
|
+
NO_SHOW = "NO_SHOW"
|
|
53
|
+
}
|
|
@@ -9,7 +9,7 @@ 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.ShowroomVisitUpdateDTO = exports.ShowroomVisitCreateDTO = exports.IsTimeConstraint = void 0;
|
|
12
|
+
exports.VisitStatus = 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
|
// Custom time format validator
|
|
@@ -19,17 +19,17 @@ let IsTimeConstraint = class IsTimeConstraint {
|
|
|
19
19
|
return /^([01]\d|2[0-3]):([0-5]\d)$/.test(time);
|
|
20
20
|
}
|
|
21
21
|
defaultMessage(args) {
|
|
22
|
-
return
|
|
22
|
+
return "Time ($value) is not a valid 24-hour time format (HH:MM)";
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
IsTimeConstraint = __decorate([
|
|
26
|
-
(0, class_validator_1.ValidatorConstraint)({ name:
|
|
26
|
+
(0, class_validator_1.ValidatorConstraint)({ name: "isTime", async: false })
|
|
27
27
|
], IsTimeConstraint);
|
|
28
28
|
exports.IsTimeConstraint = IsTimeConstraint;
|
|
29
29
|
class ShowroomVisitCreateDTO {
|
|
30
30
|
validate() {
|
|
31
31
|
const errors = (0, class_validator_1.validateSync)(this);
|
|
32
|
-
return errors.map(error => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
32
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
33
33
|
}
|
|
34
34
|
static fromPlain(plain) {
|
|
35
35
|
return (0, class_transformer_1.plainToClass)(ShowroomVisitCreateDTO, plain);
|
|
@@ -61,6 +61,7 @@ __decorate([
|
|
|
61
61
|
__decorate([
|
|
62
62
|
(0, class_validator_1.IsArray)(),
|
|
63
63
|
(0, class_validator_1.IsString)({ each: true }),
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
64
65
|
__metadata("design:type", Array)
|
|
65
66
|
], ShowroomVisitCreateDTO.prototype, "Interested_Cars", void 0);
|
|
66
67
|
__decorate([
|
|
@@ -73,7 +74,7 @@ exports.ShowroomVisitCreateDTO = ShowroomVisitCreateDTO;
|
|
|
73
74
|
class ShowroomVisitUpdateDTO {
|
|
74
75
|
validate() {
|
|
75
76
|
const errors = (0, class_validator_1.validateSync)(this);
|
|
76
|
-
return errors.map(error => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
77
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
77
78
|
}
|
|
78
79
|
static fromPlain(plain) {
|
|
79
80
|
return (0, class_transformer_1.plainToClass)(ShowroomVisitUpdateDTO, plain);
|
|
@@ -117,3 +118,83 @@ __decorate([
|
|
|
117
118
|
__metadata("design:type", String)
|
|
118
119
|
], ShowroomVisitUpdateDTO.prototype, "AssignedAgentId", void 0);
|
|
119
120
|
exports.ShowroomVisitUpdateDTO = ShowroomVisitUpdateDTO;
|
|
121
|
+
class ShowroomVisitResponseDTO {
|
|
122
|
+
validate() {
|
|
123
|
+
const errors = (0, class_validator_1.validateSync)(this);
|
|
124
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
125
|
+
}
|
|
126
|
+
static fromPlain(plain) {
|
|
127
|
+
return (0, class_transformer_1.plainToClass)(ShowroomVisitResponseDTO, plain);
|
|
128
|
+
}
|
|
129
|
+
toPlain() {
|
|
130
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, class_validator_1.IsUUID)(),
|
|
135
|
+
__metadata("design:type", String)
|
|
136
|
+
], ShowroomVisitResponseDTO.prototype, "id", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, class_validator_1.IsString)(),
|
|
139
|
+
__metadata("design:type", String)
|
|
140
|
+
], ShowroomVisitResponseDTO.prototype, "Visitor_FullName", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
(0, class_validator_1.IsString)(),
|
|
143
|
+
__metadata("design:type", String)
|
|
144
|
+
], ShowroomVisitResponseDTO.prototype, "Visitor_Mobile", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
(0, class_validator_1.IsDateString)(),
|
|
147
|
+
__metadata("design:type", String)
|
|
148
|
+
], ShowroomVisitResponseDTO.prototype, "Visit_Date", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
(0, class_validator_1.Validate)(IsTimeConstraint),
|
|
151
|
+
__metadata("design:type", String)
|
|
152
|
+
], ShowroomVisitResponseDTO.prototype, "Visit_Time", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, class_validator_1.IsString)(),
|
|
155
|
+
__metadata("design:type", String)
|
|
156
|
+
], ShowroomVisitResponseDTO.prototype, "Visit_Interest", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, class_validator_1.IsArray)(),
|
|
159
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
160
|
+
(0, class_validator_1.IsOptional)(),
|
|
161
|
+
__metadata("design:type", Array)
|
|
162
|
+
], ShowroomVisitResponseDTO.prototype, "Interested_Cars", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, class_validator_1.IsOptional)(),
|
|
165
|
+
(0, class_validator_1.IsUUID)(),
|
|
166
|
+
__metadata("design:type", String)
|
|
167
|
+
], ShowroomVisitResponseDTO.prototype, "AssignedAgentId", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, class_validator_1.IsOptional)(),
|
|
170
|
+
(0, class_validator_1.IsString)(),
|
|
171
|
+
__metadata("design:type", String)
|
|
172
|
+
], ShowroomVisitResponseDTO.prototype, "AssignedAgentName", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
(0, class_validator_1.IsBoolean)(),
|
|
175
|
+
(0, class_validator_1.IsOptional)(),
|
|
176
|
+
__metadata("design:type", Boolean)
|
|
177
|
+
], ShowroomVisitResponseDTO.prototype, "IsCompleted", void 0);
|
|
178
|
+
__decorate([
|
|
179
|
+
(0, class_validator_1.IsString)(),
|
|
180
|
+
(0, class_validator_1.IsOptional)(),
|
|
181
|
+
__metadata("design:type", String)
|
|
182
|
+
], ShowroomVisitResponseDTO.prototype, "VisitNotes", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
(0, class_validator_1.IsDateString)(),
|
|
185
|
+
__metadata("design:type", String)
|
|
186
|
+
], ShowroomVisitResponseDTO.prototype, "CreatedAt", void 0);
|
|
187
|
+
__decorate([
|
|
188
|
+
(0, class_validator_1.IsDateString)(),
|
|
189
|
+
__metadata("design:type", String)
|
|
190
|
+
], ShowroomVisitResponseDTO.prototype, "UpdatedAt", void 0);
|
|
191
|
+
exports.ShowroomVisitResponseDTO = ShowroomVisitResponseDTO;
|
|
192
|
+
// Optional: Create an enum for visit status if needed
|
|
193
|
+
var VisitStatus;
|
|
194
|
+
(function (VisitStatus) {
|
|
195
|
+
VisitStatus["SCHEDULED"] = "SCHEDULED";
|
|
196
|
+
VisitStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
197
|
+
VisitStatus["COMPLETED"] = "COMPLETED";
|
|
198
|
+
VisitStatus["CANCELLED"] = "CANCELLED";
|
|
199
|
+
VisitStatus["NO_SHOW"] = "NO_SHOW";
|
|
200
|
+
})(VisitStatus = exports.VisitStatus || (exports.VisitStatus = {}));
|
|
@@ -2,17 +2,20 @@ import { TestDriveRequestFilter, TestDriveRequestSelectFields } from "../utiliti
|
|
|
2
2
|
import { BaseCreateDTO, BaseUpdateDTO } from "../../../vehicle/data/dto/BaseDTO";
|
|
3
3
|
import { DynamicVehicleDTO } from "../../../vehicle/data/dto/VehicleDTO";
|
|
4
4
|
import { LeadThrough, TestDriveRequestStatus } from "../enums";
|
|
5
|
-
import { TestDriveRequest } from "../models/TestDriveRequest";
|
|
6
|
-
import { BaseGetDTO } from "../../../../global/dto/BaseGetDTO";
|
|
7
|
-
import { TypedOptions } from "../../../../global/utilities";
|
|
8
5
|
import { VehicleSelectFields } from "../../../vehicle/data/utilities";
|
|
9
|
-
export
|
|
6
|
+
export declare class TestDriveRequestGetDTOOptions {
|
|
10
7
|
select?: (TestDriveRequestSelectFields | `vehicle.${VehicleSelectFields}`)[];
|
|
11
8
|
withVehicle?: boolean;
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
page?: number;
|
|
10
|
+
limit?: number;
|
|
11
|
+
sort?: any;
|
|
12
|
+
}
|
|
13
|
+
export declare class TestDriveRequestGetDTO {
|
|
14
14
|
filters?: TestDriveRequestFilter;
|
|
15
15
|
options?: TestDriveRequestGetDTOOptions;
|
|
16
|
+
validate(): string[];
|
|
17
|
+
static fromPlain(plain: Record<string, unknown>): TestDriveRequestGetDTO;
|
|
18
|
+
toPlain(): Record<string, any>;
|
|
16
19
|
}
|
|
17
20
|
export declare class TestDriveRequestCreateDTO extends BaseCreateDTO {
|
|
18
21
|
vehicle: DynamicVehicleDTO;
|
|
@@ -9,15 +9,28 @@ 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.TestDriveRequestUpdateDTO = exports.TestDriveRequestCreateDTO = exports.TestDriveRequestGetDTO = void 0;
|
|
12
|
+
exports.TestDriveRequestUpdateDTO = exports.TestDriveRequestCreateDTO = exports.TestDriveRequestGetDTO = exports.TestDriveRequestGetDTOOptions = void 0;
|
|
13
13
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const class_transformer_1 = require("class-transformer");
|
|
16
16
|
const BaseDTO_1 = require("../../../vehicle/data/dto/BaseDTO");
|
|
17
17
|
const VehicleDTO_1 = require("../../../vehicle/data/dto/VehicleDTO");
|
|
18
18
|
const enums_1 = require("../enums");
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
class TestDriveRequestGetDTOOptions {
|
|
20
|
+
}
|
|
21
|
+
exports.TestDriveRequestGetDTOOptions = TestDriveRequestGetDTOOptions;
|
|
22
|
+
;
|
|
23
|
+
class TestDriveRequestGetDTO {
|
|
24
|
+
validate() {
|
|
25
|
+
const errors = (0, class_validator_1.validateSync)(this);
|
|
26
|
+
return errors.map(error => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
27
|
+
}
|
|
28
|
+
static fromPlain(plain) {
|
|
29
|
+
return (0, class_transformer_1.plainToClass)(TestDriveRequestGetDTO, plain);
|
|
30
|
+
}
|
|
31
|
+
toPlain() {
|
|
32
|
+
return (0, class_transformer_1.instanceToPlain)(this);
|
|
33
|
+
}
|
|
21
34
|
}
|
|
22
35
|
exports.TestDriveRequestGetDTO = TestDriveRequestGetDTO;
|
|
23
36
|
class TestDriveRequestCreateDTO extends BaseDTO_1.BaseCreateDTO {
|