@alba-cars/common-modules 1.10.45 → 1.10.47

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.
@@ -6,6 +6,7 @@ export declare enum LeadSource {
6
6
  SHOWROOM_VISIT = "SHOWROOM_VISIT",
7
7
  FINANCE_ELIGIBILITY_REQUEST = "FINANCE_ELIGIBILITY_REQUEST",
8
8
  BANK_VALUATION_REQUEST = "BANK_VALUATION_REQUEST",
9
+ FREE_VALUATION = "FREE_VALUATION",
9
10
  PHONE = "PHONE",
10
11
  WALK_IN = "WALK_IN",
11
12
  REFERRAL = "REFERRAL",
@@ -10,6 +10,7 @@ var LeadSource;
10
10
  LeadSource["SHOWROOM_VISIT"] = "SHOWROOM_VISIT";
11
11
  LeadSource["FINANCE_ELIGIBILITY_REQUEST"] = "FINANCE_ELIGIBILITY_REQUEST";
12
12
  LeadSource["BANK_VALUATION_REQUEST"] = "BANK_VALUATION_REQUEST";
13
+ LeadSource["FREE_VALUATION"] = "FREE_VALUATION";
13
14
  LeadSource["PHONE"] = "PHONE";
14
15
  LeadSource["WALK_IN"] = "WALK_IN";
15
16
  LeadSource["REFERRAL"] = "REFERRAL";
@@ -58,6 +58,34 @@ export declare class SellCarRequestCreateDTO {
58
58
  dealDriveEstimation?: number;
59
59
  images: string[];
60
60
  media?: VehicleMediaCreateDTO[];
61
+ inspectionBookingDate?: Date;
62
+ validate(): string[];
63
+ static fromPlain(plain: Record<string, unknown>): SellCarRequestCreateDTO;
64
+ toPlain(): Record<string, unknown>;
65
+ }
66
+ export declare class ExchangeCarRequestCreateDTO {
67
+ name: string;
68
+ phone: string;
69
+ brand: string;
70
+ brandName: string;
71
+ model: string;
72
+ modelName: string;
73
+ modelVersion?: string;
74
+ modelVersionName?: string;
75
+ year: string;
76
+ mileage: number;
77
+ expectedSellingPrice?: number;
78
+ description: string;
79
+ emirates: string;
80
+ specification: string;
81
+ specificationName: string;
82
+ requestType?: RequestType;
83
+ tradeIn: TradeInOption;
84
+ additionalDetails?: string;
85
+ dealDriveEstimation?: number;
86
+ images: string[];
87
+ media?: VehicleMediaCreateDTO[];
88
+ bookingDate?: Date;
61
89
  validate(): string[];
62
90
  static fromPlain(plain: Record<string, unknown>): SellCarRequestCreateDTO;
63
91
  toPlain(): Record<string, unknown>;
@@ -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.SellCarFetchDTO = exports.SellCarOptionsDTO = exports.SellCarFilterDTO = exports.SellCarRequestResponseDTO = exports.SellCarRequestUpdateDTO = exports.SellCarRequestCreateDTO = exports.SellCarRequestDTO = exports.VehicleOption = exports.TradeInOption = exports.RequestType = void 0;
12
+ exports.SellCarFetchDTO = exports.SellCarOptionsDTO = exports.SellCarFilterDTO = exports.SellCarRequestResponseDTO = exports.SellCarRequestUpdateDTO = exports.ExchangeCarRequestCreateDTO = exports.SellCarRequestCreateDTO = exports.SellCarRequestDTO = exports.VehicleOption = exports.TradeInOption = exports.RequestType = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  const class_transformer_1 = require("class-transformer");
15
15
  const class_transformer_2 = require("class-transformer");
@@ -235,7 +235,128 @@ __decorate([
235
235
  (0, class_validator_1.IsOptional)(),
236
236
  __metadata("design:type", Array)
237
237
  ], SellCarRequestCreateDTO.prototype, "media", void 0);
238
+ __decorate([
239
+ (0, class_validator_1.IsOptional)(),
240
+ (0, class_validator_1.IsDate)(),
241
+ __metadata("design:type", Date)
242
+ ], SellCarRequestCreateDTO.prototype, "inspectionBookingDate", void 0);
238
243
  exports.SellCarRequestCreateDTO = SellCarRequestCreateDTO;
244
+ class ExchangeCarRequestCreateDTO {
245
+ validate() {
246
+ const errors = (0, class_validator_1.validateSync)(this);
247
+ return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
248
+ }
249
+ static fromPlain(plain) {
250
+ return (0, class_transformer_1.plainToClass)(SellCarRequestCreateDTO, plain);
251
+ }
252
+ toPlain() {
253
+ return (0, class_transformer_1.classToPlain)(this);
254
+ }
255
+ }
256
+ __decorate([
257
+ (0, class_validator_1.IsString)(),
258
+ (0, class_validator_1.IsNotEmpty)(),
259
+ __metadata("design:type", String)
260
+ ], ExchangeCarRequestCreateDTO.prototype, "name", void 0);
261
+ __decorate([
262
+ (0, class_validator_1.IsString)(),
263
+ (0, class_validator_1.IsPhoneNumber)(),
264
+ __metadata("design:type", String)
265
+ ], ExchangeCarRequestCreateDTO.prototype, "phone", void 0);
266
+ __decorate([
267
+ (0, class_validator_1.IsString)(),
268
+ __metadata("design:type", String)
269
+ ], ExchangeCarRequestCreateDTO.prototype, "brand", void 0);
270
+ __decorate([
271
+ (0, class_validator_1.IsString)(),
272
+ __metadata("design:type", String)
273
+ ], ExchangeCarRequestCreateDTO.prototype, "brandName", void 0);
274
+ __decorate([
275
+ (0, class_validator_1.IsString)(),
276
+ __metadata("design:type", String)
277
+ ], ExchangeCarRequestCreateDTO.prototype, "model", void 0);
278
+ __decorate([
279
+ (0, class_validator_1.IsString)(),
280
+ __metadata("design:type", String)
281
+ ], ExchangeCarRequestCreateDTO.prototype, "modelName", void 0);
282
+ __decorate([
283
+ (0, class_validator_1.IsString)(),
284
+ (0, class_validator_1.IsOptional)(),
285
+ __metadata("design:type", String)
286
+ ], ExchangeCarRequestCreateDTO.prototype, "modelVersion", void 0);
287
+ __decorate([
288
+ (0, class_validator_1.IsString)(),
289
+ (0, class_validator_1.IsOptional)(),
290
+ __metadata("design:type", String)
291
+ ], ExchangeCarRequestCreateDTO.prototype, "modelVersionName", void 0);
292
+ __decorate([
293
+ (0, class_validator_1.IsString)(),
294
+ __metadata("design:type", String)
295
+ ], ExchangeCarRequestCreateDTO.prototype, "year", void 0);
296
+ __decorate([
297
+ (0, class_validator_1.IsNumber)(),
298
+ __metadata("design:type", Number)
299
+ ], ExchangeCarRequestCreateDTO.prototype, "mileage", void 0);
300
+ __decorate([
301
+ (0, class_validator_1.IsNumber)(),
302
+ (0, class_validator_1.IsOptional)(),
303
+ __metadata("design:type", Number)
304
+ ], ExchangeCarRequestCreateDTO.prototype, "expectedSellingPrice", void 0);
305
+ __decorate([
306
+ (0, class_validator_1.IsString)(),
307
+ (0, class_validator_1.IsOptional)(),
308
+ __metadata("design:type", String)
309
+ ], ExchangeCarRequestCreateDTO.prototype, "description", void 0);
310
+ __decorate([
311
+ (0, class_validator_1.IsString)(),
312
+ (0, class_validator_1.IsOptional)(),
313
+ __metadata("design:type", String)
314
+ ], ExchangeCarRequestCreateDTO.prototype, "emirates", void 0);
315
+ __decorate([
316
+ (0, class_validator_1.IsString)(),
317
+ (0, class_validator_1.IsOptional)(),
318
+ __metadata("design:type", String)
319
+ ], ExchangeCarRequestCreateDTO.prototype, "specification", void 0);
320
+ __decorate([
321
+ (0, class_validator_1.IsString)(),
322
+ __metadata("design:type", String)
323
+ ], ExchangeCarRequestCreateDTO.prototype, "specificationName", void 0);
324
+ __decorate([
325
+ (0, class_validator_1.IsEnum)(RequestType),
326
+ (0, class_validator_1.IsOptional)(),
327
+ __metadata("design:type", String)
328
+ ], ExchangeCarRequestCreateDTO.prototype, "requestType", void 0);
329
+ __decorate([
330
+ (0, class_validator_1.IsEnum)(TradeInOption),
331
+ __metadata("design:type", String)
332
+ ], ExchangeCarRequestCreateDTO.prototype, "tradeIn", void 0);
333
+ __decorate([
334
+ (0, class_validator_1.IsString)(),
335
+ (0, class_validator_1.IsOptional)(),
336
+ __metadata("design:type", String)
337
+ ], ExchangeCarRequestCreateDTO.prototype, "additionalDetails", void 0);
338
+ __decorate([
339
+ (0, class_validator_1.IsNumber)(),
340
+ (0, class_validator_1.IsOptional)(),
341
+ __metadata("design:type", Number)
342
+ ], ExchangeCarRequestCreateDTO.prototype, "dealDriveEstimation", void 0);
343
+ __decorate([
344
+ (0, class_validator_1.IsArray)(),
345
+ (0, class_validator_1.IsString)({ each: true }),
346
+ __metadata("design:type", Array)
347
+ ], ExchangeCarRequestCreateDTO.prototype, "images", void 0);
348
+ __decorate([
349
+ (0, class_validator_1.ValidateNested)({ each: true }),
350
+ (0, class_transformer_2.Type)(() => vehicle_1.VehicleMediaCreateDTO),
351
+ (0, class_validator_1.IsOptional)(),
352
+ __metadata("design:type", Array)
353
+ ], ExchangeCarRequestCreateDTO.prototype, "media", void 0);
354
+ __decorate([
355
+ (0, class_validator_1.IsOptional)(),
356
+ (0, class_validator_1.IsDate)(),
357
+ __metadata("design:type", Date)
358
+ ], ExchangeCarRequestCreateDTO.prototype, "bookingDate", void 0);
359
+ exports.ExchangeCarRequestCreateDTO = ExchangeCarRequestCreateDTO;
239
360
  class SellCarRequestUpdateDTO {
240
361
  validate() {
241
362
  const errors = (0, class_validator_1.validateSync)(this);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.10.45",
6
+ "version": "1.10.47",
7
7
  "description": "A package containing DTOs, validation classes and common modules and interfaces for Alba Cars",
8
8
  "main": "dist/index.js",
9
9
  "types": "dist/index.d.ts",