@alba-cars/common-modules 1.3.1 → 1.3.3

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.
Files changed (31) hide show
  1. package/dist/core/error-handling/AppError.d.ts +3 -1
  2. package/dist/core/error-handling/AppError.js +2 -0
  3. package/dist/core/network/endpoint-config.d.ts +5 -0
  4. package/dist/core/network/endpoint-config.js +7 -2
  5. package/dist/features/auth/data/dto/AuthDTO.d.ts +20 -0
  6. package/dist/features/auth/data/dto/AuthDTO.js +47 -0
  7. package/dist/features/auth/data/index.d.ts +1 -0
  8. package/dist/features/auth/data/index.js +17 -0
  9. package/dist/features/auth/index.d.ts +1 -0
  10. package/dist/features/auth/index.js +17 -0
  11. package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.d.ts +21 -0
  12. package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.js +56 -1
  13. package/dist/features/index.d.ts +2 -1
  14. package/dist/features/index.js +2 -1
  15. package/dist/features/lead/data/dto/lead_dto.d.ts +5 -3
  16. package/dist/features/lead/data/dto/lead_dto.js +20 -8
  17. package/dist/features/sell-car-request/data/dto/SellCarRequestDTO.d.ts +154 -0
  18. package/dist/features/sell-car-request/data/dto/SellCarRequestDTO.js +444 -0
  19. package/dist/features/sell-car-request/data/index.d.ts +1 -0
  20. package/dist/features/sell-car-request/data/index.js +17 -0
  21. package/dist/features/sell-car-request/index.d.ts +1 -0
  22. package/dist/features/sell-car-request/index.js +17 -0
  23. package/dist/features/vehicle/data/dto/BaseDTO.d.ts +3 -4
  24. package/dist/features/vehicle/data/dto/BaseDTO.js +6 -14
  25. package/dist/features/vehicle/data/dto/VehicleFilterDTO.d.ts +1 -0
  26. package/dist/features/vehicle/data/dto/VehicleMedia.d.ts +1 -0
  27. package/dist/features/vehicle/data/dto/VehicleMedia.js +4 -0
  28. package/dist/features/vehicle/data/utilities.js +0 -1202
  29. package/dist/features/vehicle-reservations/data/dto/VehicleReservationDTO.d.ts +7 -3
  30. package/dist/features/vehicle-reservations/data/dto/VehicleReservationDTO.js +14 -2
  31. package/package.json +1 -1
@@ -0,0 +1,444 @@
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.SellCarFetchDTO = exports.SellCarOptionsDTO = exports.SellCarFilterDTO = 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
+ const global_1 = require("../../../../global");
16
+ var RequestType;
17
+ (function (RequestType) {
18
+ RequestType["SELL"] = "sell";
19
+ RequestType["TRADE_IN"] = "trade_in";
20
+ })(RequestType = exports.RequestType || (exports.RequestType = {}));
21
+ class SellCarRequestCreateDTO {
22
+ validate() {
23
+ const errors = (0, class_validator_1.validateSync)(this);
24
+ return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
25
+ }
26
+ static fromPlain(plain) {
27
+ const requestType = plain.desiredVehicleId
28
+ ? RequestType.TRADE_IN
29
+ : RequestType.SELL;
30
+ return (0, class_transformer_1.plainToClass)(SellCarRequestCreateDTO, { ...plain, requestType });
31
+ }
32
+ toPlain() {
33
+ return (0, class_transformer_1.classToPlain)(this);
34
+ }
35
+ }
36
+ __decorate([
37
+ (0, class_validator_1.IsString)(),
38
+ __metadata("design:type", String)
39
+ ], SellCarRequestCreateDTO.prototype, "name", void 0);
40
+ __decorate([
41
+ (0, class_validator_1.IsPhoneNumber)(),
42
+ __metadata("design:type", String)
43
+ ], SellCarRequestCreateDTO.prototype, "phone", void 0);
44
+ __decorate([
45
+ (0, class_validator_1.IsEmail)(),
46
+ (0, class_validator_1.IsOptional)(),
47
+ __metadata("design:type", String)
48
+ ], SellCarRequestCreateDTO.prototype, "email", void 0);
49
+ __decorate([
50
+ (0, class_validator_1.IsString)(),
51
+ __metadata("design:type", String)
52
+ ], SellCarRequestCreateDTO.prototype, "city", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsEnum)(RequestType),
55
+ __metadata("design:type", String)
56
+ ], SellCarRequestCreateDTO.prototype, "requestType", void 0);
57
+ __decorate([
58
+ (0, class_validator_1.IsUUID)(),
59
+ __metadata("design:type", String)
60
+ ], SellCarRequestCreateDTO.prototype, "makeId", void 0);
61
+ __decorate([
62
+ (0, class_validator_1.IsUUID)(),
63
+ __metadata("design:type", String)
64
+ ], SellCarRequestCreateDTO.prototype, "modelId", void 0);
65
+ __decorate([
66
+ (0, class_validator_1.IsNumber)(),
67
+ (0, class_validator_1.IsPositive)(),
68
+ __metadata("design:type", Number)
69
+ ], SellCarRequestCreateDTO.prototype, "year", void 0);
70
+ __decorate([
71
+ (0, class_validator_1.IsNumber)(),
72
+ (0, class_validator_1.IsPositive)(),
73
+ __metadata("design:type", Number)
74
+ ], SellCarRequestCreateDTO.prototype, "mileage", void 0);
75
+ __decorate([
76
+ (0, class_validator_1.IsNumber)(),
77
+ (0, class_validator_1.IsPositive)(),
78
+ (0, class_validator_1.ValidateIf)((o) => o.requestType === RequestType.SELL),
79
+ (0, class_validator_1.IsOptional)(),
80
+ __metadata("design:type", Number)
81
+ ], SellCarRequestCreateDTO.prototype, "expectedSellingPrice", void 0);
82
+ __decorate([
83
+ (0, class_validator_1.IsString)(),
84
+ (0, class_validator_1.ValidateIf)((o) => o.requestType === RequestType.SELL),
85
+ (0, class_validator_1.IsOptional)(),
86
+ __metadata("design:type", String)
87
+ ], SellCarRequestCreateDTO.prototype, "vehicleOptions", void 0);
88
+ __decorate([
89
+ (0, class_validator_1.IsString)(),
90
+ (0, class_validator_1.ValidateIf)((o) => o.requestType === RequestType.SELL),
91
+ (0, class_validator_1.IsOptional)(),
92
+ __metadata("design:type", String)
93
+ ], SellCarRequestCreateDTO.prototype, "specification", void 0);
94
+ __decorate([
95
+ (0, class_validator_1.IsArray)(),
96
+ (0, class_validator_1.IsString)({ each: true }),
97
+ (0, class_validator_1.ValidateIf)((o) => o.requestType === RequestType.SELL),
98
+ (0, class_validator_1.IsOptional)(),
99
+ __metadata("design:type", Array)
100
+ ], SellCarRequestCreateDTO.prototype, "images", void 0);
101
+ __decorate([
102
+ (0, class_validator_1.IsUUID)(),
103
+ (0, class_validator_1.ValidateIf)((o) => o.requestType === RequestType.TRADE_IN),
104
+ (0, class_validator_1.IsOptional)(),
105
+ __metadata("design:type", String)
106
+ ], SellCarRequestCreateDTO.prototype, "desiredVehicleId", void 0);
107
+ __decorate([
108
+ (0, class_validator_1.IsString)(),
109
+ (0, class_validator_1.IsOptional)(),
110
+ __metadata("design:type", String)
111
+ ], SellCarRequestCreateDTO.prototype, "color", void 0);
112
+ __decorate([
113
+ (0, class_validator_1.IsString)(),
114
+ (0, class_validator_1.IsOptional)(),
115
+ __metadata("design:type", String)
116
+ ], SellCarRequestCreateDTO.prototype, "transmission", void 0);
117
+ __decorate([
118
+ (0, class_validator_1.IsString)(),
119
+ (0, class_validator_1.IsOptional)(),
120
+ __metadata("design:type", String)
121
+ ], SellCarRequestCreateDTO.prototype, "condition", void 0);
122
+ __decorate([
123
+ (0, class_validator_1.IsString)(),
124
+ (0, class_validator_1.IsOptional)(),
125
+ __metadata("design:type", String)
126
+ ], SellCarRequestCreateDTO.prototype, "fuelType", void 0);
127
+ __decorate([
128
+ (0, class_validator_1.IsString)(),
129
+ (0, class_validator_1.IsOptional)(),
130
+ __metadata("design:type", String)
131
+ ], SellCarRequestCreateDTO.prototype, "engineCapacity", void 0);
132
+ __decorate([
133
+ (0, class_validator_1.IsString)(),
134
+ (0, class_validator_1.IsOptional)(),
135
+ __metadata("design:type", String)
136
+ ], SellCarRequestCreateDTO.prototype, "description", void 0);
137
+ __decorate([
138
+ (0, class_validator_1.IsOptional)(),
139
+ __metadata("design:type", Object)
140
+ ], SellCarRequestCreateDTO.prototype, "additionalDetails", void 0);
141
+ exports.SellCarRequestCreateDTO = SellCarRequestCreateDTO;
142
+ class SellCarRequestUpdateDTO {
143
+ validate() {
144
+ const errors = (0, class_validator_1.validateSync)(this);
145
+ return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
146
+ }
147
+ static fromPlain(plain) {
148
+ return (0, class_transformer_1.plainToClass)(SellCarRequestUpdateDTO, plain);
149
+ }
150
+ toPlain() {
151
+ return (0, class_transformer_1.classToPlain)(this);
152
+ }
153
+ }
154
+ __decorate([
155
+ (0, class_validator_1.IsOptional)(),
156
+ (0, class_validator_1.IsString)(),
157
+ __metadata("design:type", String)
158
+ ], SellCarRequestUpdateDTO.prototype, "name", void 0);
159
+ __decorate([
160
+ (0, class_validator_1.IsOptional)(),
161
+ (0, class_validator_1.IsPhoneNumber)(),
162
+ __metadata("design:type", String)
163
+ ], SellCarRequestUpdateDTO.prototype, "phone", void 0);
164
+ __decorate([
165
+ (0, class_validator_1.IsOptional)(),
166
+ (0, class_validator_1.IsEmail)(),
167
+ __metadata("design:type", String)
168
+ ], SellCarRequestUpdateDTO.prototype, "email", void 0);
169
+ __decorate([
170
+ (0, class_validator_1.IsOptional)(),
171
+ (0, class_validator_1.IsString)(),
172
+ __metadata("design:type", String)
173
+ ], SellCarRequestUpdateDTO.prototype, "city", void 0);
174
+ __decorate([
175
+ (0, class_validator_1.IsOptional)(),
176
+ (0, class_validator_1.IsEnum)(RequestType),
177
+ __metadata("design:type", String)
178
+ ], SellCarRequestUpdateDTO.prototype, "requestType", void 0);
179
+ __decorate([
180
+ (0, class_validator_1.IsOptional)(),
181
+ (0, class_validator_1.IsUUID)(),
182
+ __metadata("design:type", String)
183
+ ], SellCarRequestUpdateDTO.prototype, "makeId", void 0);
184
+ __decorate([
185
+ (0, class_validator_1.IsOptional)(),
186
+ (0, class_validator_1.IsUUID)(),
187
+ __metadata("design:type", String)
188
+ ], SellCarRequestUpdateDTO.prototype, "modelId", void 0);
189
+ __decorate([
190
+ (0, class_validator_1.IsOptional)(),
191
+ (0, class_validator_1.IsNumber)(),
192
+ (0, class_validator_1.IsPositive)(),
193
+ __metadata("design:type", Number)
194
+ ], SellCarRequestUpdateDTO.prototype, "year", void 0);
195
+ __decorate([
196
+ (0, class_validator_1.IsOptional)(),
197
+ (0, class_validator_1.IsNumber)(),
198
+ (0, class_validator_1.IsPositive)(),
199
+ __metadata("design:type", Number)
200
+ ], SellCarRequestUpdateDTO.prototype, "mileage", void 0);
201
+ __decorate([
202
+ (0, class_validator_1.IsOptional)(),
203
+ (0, class_validator_1.IsNumber)(),
204
+ (0, class_validator_1.IsPositive)(),
205
+ __metadata("design:type", Number)
206
+ ], SellCarRequestUpdateDTO.prototype, "expectedSellingPrice", void 0);
207
+ __decorate([
208
+ (0, class_validator_1.IsOptional)(),
209
+ (0, class_validator_1.IsString)(),
210
+ __metadata("design:type", String)
211
+ ], SellCarRequestUpdateDTO.prototype, "vehicleOptions", void 0);
212
+ __decorate([
213
+ (0, class_validator_1.IsOptional)(),
214
+ (0, class_validator_1.IsString)(),
215
+ __metadata("design:type", String)
216
+ ], SellCarRequestUpdateDTO.prototype, "specification", void 0);
217
+ __decorate([
218
+ (0, class_validator_1.IsString)(),
219
+ (0, class_validator_1.IsOptional)(),
220
+ __metadata("design:type", String)
221
+ ], SellCarRequestUpdateDTO.prototype, "condition", void 0);
222
+ __decorate([
223
+ (0, class_validator_1.IsOptional)(),
224
+ (0, class_validator_1.IsArray)(),
225
+ (0, class_validator_1.IsString)({ each: true }),
226
+ __metadata("design:type", Array)
227
+ ], SellCarRequestUpdateDTO.prototype, "images", void 0);
228
+ __decorate([
229
+ (0, class_validator_1.IsOptional)(),
230
+ (0, class_validator_1.IsUUID)(),
231
+ __metadata("design:type", String)
232
+ ], SellCarRequestUpdateDTO.prototype, "desiredVehicleId", void 0);
233
+ __decorate([
234
+ (0, class_validator_1.IsOptional)(),
235
+ (0, class_validator_1.IsString)(),
236
+ __metadata("design:type", String)
237
+ ], SellCarRequestUpdateDTO.prototype, "color", void 0);
238
+ __decorate([
239
+ (0, class_validator_1.IsOptional)(),
240
+ (0, class_validator_1.IsString)(),
241
+ __metadata("design:type", String)
242
+ ], SellCarRequestUpdateDTO.prototype, "transmission", void 0);
243
+ __decorate([
244
+ (0, class_validator_1.IsOptional)(),
245
+ (0, class_validator_1.IsString)(),
246
+ __metadata("design:type", String)
247
+ ], SellCarRequestUpdateDTO.prototype, "fuelType", void 0);
248
+ __decorate([
249
+ (0, class_validator_1.IsOptional)(),
250
+ (0, class_validator_1.IsString)(),
251
+ __metadata("design:type", String)
252
+ ], SellCarRequestUpdateDTO.prototype, "engineCapacity", void 0);
253
+ __decorate([
254
+ (0, class_validator_1.IsOptional)(),
255
+ (0, class_validator_1.IsString)(),
256
+ __metadata("design:type", String)
257
+ ], SellCarRequestUpdateDTO.prototype, "description", void 0);
258
+ __decorate([
259
+ (0, class_validator_1.IsOptional)(),
260
+ (0, class_validator_1.IsEnum)([
261
+ "pending",
262
+ "inspection_scheduled",
263
+ "inspected",
264
+ "valued",
265
+ "approved",
266
+ "rejected",
267
+ "completed",
268
+ ]),
269
+ __metadata("design:type", String)
270
+ ], SellCarRequestUpdateDTO.prototype, "status", void 0);
271
+ __decorate([
272
+ (0, class_validator_1.IsOptional)(),
273
+ __metadata("design:type", Object)
274
+ ], SellCarRequestUpdateDTO.prototype, "additionalDetails", void 0);
275
+ exports.SellCarRequestUpdateDTO = SellCarRequestUpdateDTO;
276
+ class SellCarRequestResponseDTO {
277
+ validate() {
278
+ const errors = (0, class_validator_1.validateSync)(this);
279
+ return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
280
+ }
281
+ static fromPlain(plain) {
282
+ return (0, class_transformer_1.plainToClass)(SellCarRequestResponseDTO, plain);
283
+ }
284
+ toPlain() {
285
+ return (0, class_transformer_1.classToPlain)(this);
286
+ }
287
+ }
288
+ __decorate([
289
+ (0, class_validator_1.IsString)(),
290
+ __metadata("design:type", String)
291
+ ], SellCarRequestResponseDTO.prototype, "id", void 0);
292
+ __decorate([
293
+ (0, class_validator_1.IsString)(),
294
+ __metadata("design:type", String)
295
+ ], SellCarRequestResponseDTO.prototype, "name", void 0);
296
+ __decorate([
297
+ (0, class_validator_1.IsPhoneNumber)(),
298
+ __metadata("design:type", String)
299
+ ], SellCarRequestResponseDTO.prototype, "phone", void 0);
300
+ __decorate([
301
+ (0, class_validator_1.IsEmail)(),
302
+ (0, class_validator_1.IsOptional)(),
303
+ __metadata("design:type", String)
304
+ ], SellCarRequestResponseDTO.prototype, "email", void 0);
305
+ __decorate([
306
+ (0, class_validator_1.IsString)(),
307
+ __metadata("design:type", String)
308
+ ], SellCarRequestResponseDTO.prototype, "city", void 0);
309
+ __decorate([
310
+ (0, class_validator_1.IsEnum)(RequestType),
311
+ __metadata("design:type", String)
312
+ ], SellCarRequestResponseDTO.prototype, "requestType", void 0);
313
+ __decorate([
314
+ (0, class_validator_1.IsNumber)(),
315
+ (0, class_validator_1.IsOptional)(),
316
+ __metadata("design:type", Number)
317
+ ], SellCarRequestResponseDTO.prototype, "year", void 0);
318
+ __decorate([
319
+ (0, class_validator_1.IsNumber)(),
320
+ (0, class_validator_1.IsOptional)(),
321
+ __metadata("design:type", Number)
322
+ ], SellCarRequestResponseDTO.prototype, "mileage", void 0);
323
+ __decorate([
324
+ (0, class_validator_1.IsNumber)(),
325
+ (0, class_validator_1.IsOptional)(),
326
+ __metadata("design:type", Number)
327
+ ], SellCarRequestResponseDTO.prototype, "expectedSellingPrice", void 0);
328
+ __decorate([
329
+ (0, class_validator_1.IsString)(),
330
+ (0, class_validator_1.IsOptional)(),
331
+ __metadata("design:type", String)
332
+ ], SellCarRequestResponseDTO.prototype, "vehicleOptions", void 0);
333
+ __decorate([
334
+ (0, class_validator_1.IsString)(),
335
+ (0, class_validator_1.IsOptional)(),
336
+ __metadata("design:type", String)
337
+ ], SellCarRequestResponseDTO.prototype, "specification", void 0);
338
+ __decorate([
339
+ (0, class_validator_1.IsArray)(),
340
+ (0, class_validator_1.IsString)({ each: true }),
341
+ (0, class_validator_1.IsOptional)(),
342
+ __metadata("design:type", Array)
343
+ ], SellCarRequestResponseDTO.prototype, "images", void 0);
344
+ __decorate([
345
+ (0, class_validator_1.IsOptional)(),
346
+ __metadata("design:type", Object)
347
+ ], SellCarRequestResponseDTO.prototype, "desiredVehicle", void 0);
348
+ __decorate([
349
+ (0, class_validator_1.IsString)(),
350
+ (0, class_validator_1.IsOptional)(),
351
+ __metadata("design:type", String)
352
+ ], SellCarRequestResponseDTO.prototype, "color", void 0);
353
+ __decorate([
354
+ (0, class_validator_1.IsString)(),
355
+ (0, class_validator_1.IsOptional)(),
356
+ __metadata("design:type", String)
357
+ ], SellCarRequestResponseDTO.prototype, "transmission", void 0);
358
+ __decorate([
359
+ (0, class_validator_1.IsString)(),
360
+ (0, class_validator_1.IsOptional)(),
361
+ __metadata("design:type", String)
362
+ ], SellCarRequestResponseDTO.prototype, "condition", void 0);
363
+ __decorate([
364
+ (0, class_validator_1.IsString)(),
365
+ (0, class_validator_1.IsOptional)(),
366
+ __metadata("design:type", String)
367
+ ], SellCarRequestResponseDTO.prototype, "fuelType", void 0);
368
+ __decorate([
369
+ (0, class_validator_1.IsString)(),
370
+ (0, class_validator_1.IsOptional)(),
371
+ __metadata("design:type", String)
372
+ ], SellCarRequestResponseDTO.prototype, "engineCapacity", void 0);
373
+ __decorate([
374
+ (0, class_validator_1.IsString)(),
375
+ (0, class_validator_1.IsOptional)(),
376
+ __metadata("design:type", String)
377
+ ], SellCarRequestResponseDTO.prototype, "description", void 0);
378
+ __decorate([
379
+ (0, class_validator_1.IsString)(),
380
+ (0, class_validator_1.IsEnum)([
381
+ "pending",
382
+ "inspection_scheduled",
383
+ "inspected",
384
+ "valued",
385
+ "approved",
386
+ "rejected",
387
+ "completed",
388
+ ]),
389
+ __metadata("design:type", String)
390
+ ], SellCarRequestResponseDTO.prototype, "status", void 0);
391
+ __decorate([
392
+ (0, class_validator_1.IsOptional)(),
393
+ __metadata("design:type", Object)
394
+ ], SellCarRequestResponseDTO.prototype, "additionalDetails", void 0);
395
+ exports.SellCarRequestResponseDTO = SellCarRequestResponseDTO;
396
+ class SellCarFilterDTO {
397
+ validate() {
398
+ const errors = (0, class_validator_1.validateSync)(this);
399
+ return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
400
+ }
401
+ static fromPlain(plain) {
402
+ return (0, class_transformer_1.plainToClass)(SellCarFilterDTO, plain);
403
+ }
404
+ toPlain() {
405
+ return (0, class_transformer_1.classToPlain)(this);
406
+ }
407
+ }
408
+ __decorate([
409
+ (0, class_validator_1.IsOptional)(),
410
+ __metadata("design:type", String)
411
+ ], SellCarFilterDTO.prototype, "search", void 0);
412
+ __decorate([
413
+ (0, class_validator_1.IsUUID)(),
414
+ (0, class_validator_1.IsOptional)(),
415
+ __metadata("design:type", String)
416
+ ], SellCarFilterDTO.prototype, "leadId", void 0);
417
+ __decorate([
418
+ (0, class_validator_1.IsBoolean)(),
419
+ (0, class_validator_1.IsOptional)(),
420
+ __metadata("design:type", Boolean)
421
+ ], SellCarFilterDTO.prototype, "isActive", void 0);
422
+ exports.SellCarFilterDTO = SellCarFilterDTO;
423
+ class SellCarOptionsDTO extends global_1.PaginationOptions {
424
+ static fromPlain(plain) {
425
+ return (0, class_transformer_1.plainToClass)(SellCarOptionsDTO, plain);
426
+ }
427
+ toPlain() {
428
+ return (0, class_transformer_1.classToPlain)(this);
429
+ }
430
+ }
431
+ exports.SellCarOptionsDTO = SellCarOptionsDTO;
432
+ class SellCarFetchDTO {
433
+ validate() {
434
+ const errors = (0, class_validator_1.validateSync)(this);
435
+ return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
436
+ }
437
+ static fromPlain(plain) {
438
+ return (0, class_transformer_1.plainToClass)(SellCarFetchDTO, plain);
439
+ }
440
+ toPlain() {
441
+ return (0, class_transformer_1.classToPlain)(this);
442
+ }
443
+ }
444
+ exports.SellCarFetchDTO = SellCarFetchDTO;
@@ -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,10 +1,9 @@
1
- import { User } from "../models/User";
2
1
  export declare class BaseCreateDTO {
3
- createdBy: User;
2
+ createdById: string;
4
3
  }
5
4
  export declare class BaseUpdateDTO {
6
- updatedBy: User;
5
+ updatedById: string;
7
6
  }
8
7
  export declare class BaseDeleteDTO {
9
- deletedBy: User;
8
+ deletedById: string;
10
9
  }
@@ -10,33 +10,25 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.BaseDeleteDTO = exports.BaseUpdateDTO = exports.BaseCreateDTO = void 0;
13
- const class_transformer_1 = require("class-transformer");
14
13
  const class_validator_1 = require("class-validator");
15
- const User_1 = require("../models/User");
16
14
  class BaseCreateDTO {
17
15
  }
18
16
  __decorate([
19
17
  (0, class_validator_1.IsNotEmpty)(),
20
- (0, class_validator_1.ValidateNested)(),
21
- (0, class_transformer_1.Type)(() => User_1.User),
22
- __metadata("design:type", User_1.User)
23
- ], BaseCreateDTO.prototype, "createdBy", void 0);
18
+ __metadata("design:type", String)
19
+ ], BaseCreateDTO.prototype, "createdById", void 0);
24
20
  exports.BaseCreateDTO = BaseCreateDTO;
25
21
  class BaseUpdateDTO {
26
22
  }
27
23
  __decorate([
28
24
  (0, class_validator_1.IsNotEmpty)(),
29
- (0, class_validator_1.ValidateNested)(),
30
- (0, class_transformer_1.Type)(() => User_1.User),
31
- __metadata("design:type", User_1.User)
32
- ], BaseUpdateDTO.prototype, "updatedBy", void 0);
25
+ __metadata("design:type", String)
26
+ ], BaseUpdateDTO.prototype, "updatedById", void 0);
33
27
  exports.BaseUpdateDTO = BaseUpdateDTO;
34
28
  class BaseDeleteDTO {
35
29
  }
36
30
  __decorate([
37
31
  (0, class_validator_1.IsNotEmpty)(),
38
- (0, class_validator_1.ValidateNested)(),
39
- (0, class_transformer_1.Type)(() => User_1.User),
40
- __metadata("design:type", User_1.User)
41
- ], BaseDeleteDTO.prototype, "deletedBy", void 0);
32
+ __metadata("design:type", String)
33
+ ], BaseDeleteDTO.prototype, "deletedById", void 0);
42
34
  exports.BaseDeleteDTO = BaseDeleteDTO;
@@ -224,6 +224,7 @@ export declare class VehicleOptions extends PaginationOptions {
224
224
  withBodyType?: boolean;
225
225
  withFeatures?: boolean;
226
226
  withMetaData?: boolean;
227
+ withFinance?: boolean;
227
228
  validate(): string[];
228
229
  static fromPlain(plain: Record<string, unknown>): VehicleOptions;
229
230
  static toPlain(entity: any): Record<string, unknown>;
@@ -1,6 +1,7 @@
1
1
  import { VehicleMediaType } from "../enums";
2
2
  import { FileInput } from "../../../../core";
3
3
  export declare class VehicleMediaCreateDTO {
4
+ vehicleId: string;
4
5
  mediaType: VehicleMediaType;
5
6
  mediaUrl: string;
6
7
  placeholder: string;
@@ -25,6 +25,10 @@ class VehicleMediaCreateDTO {
25
25
  return (0, class_transformer_1.instanceToPlain)(entity);
26
26
  }
27
27
  }
28
+ __decorate([
29
+ (0, class_validator_1.IsString)({ each: true }),
30
+ __metadata("design:type", String)
31
+ ], VehicleMediaCreateDTO.prototype, "vehicleId", void 0);
28
32
  __decorate([
29
33
  (0, class_validator_1.IsEnum)(enums_1.VehicleMediaType),
30
34
  __metadata("design:type", String)