@alba-cars/common-modules 1.3.5 → 1.3.7
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/features/sell-car-request/data/dto/SellCarRequestDTO.d.ts +1 -0
- package/dist/features/sell-car-request/data/dto/SellCarRequestDTO.js +5 -0
- package/dist/features/vehicle/data/dto/VehicleDTO.d.ts +1 -1
- package/dist/features/vehicle/data/dto/VehicleFilterDTO.d.ts +1 -0
- package/dist/features/vehicle/data/dto/VehicleFilterDTO.js +5 -0
- package/dist/features/vehicle/data/utilities.d.ts +1 -60
- package/dist/features/vehicle/data/utilities.js +1 -234
- package/package.json +1 -1
|
@@ -306,6 +306,11 @@ __decorate([
|
|
|
306
306
|
(0, class_validator_1.IsString)(),
|
|
307
307
|
__metadata("design:type", String)
|
|
308
308
|
], SellCarRequestResponseDTO.prototype, "city", void 0);
|
|
309
|
+
__decorate([
|
|
310
|
+
(0, class_validator_1.IsString)(),
|
|
311
|
+
(0, class_validator_1.IsOptional)(),
|
|
312
|
+
__metadata("design:type", String)
|
|
313
|
+
], SellCarRequestResponseDTO.prototype, "marketPrice", void 0);
|
|
309
314
|
__decorate([
|
|
310
315
|
(0, class_validator_1.IsEnum)(RequestType),
|
|
311
316
|
__metadata("design:type", String)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { VehicleFilter, VehicleOptions, VehicleUniqueFilter } from "../utilities";
|
|
2
1
|
import { BaseCreateDTO, BaseUpdateDTO } from "./BaseDTO";
|
|
3
2
|
import { DynamicMakeDTO } from "./VehicleMakeDTO";
|
|
4
3
|
import { DynamicModelDTO } from "./VehicleModelDTO";
|
|
5
4
|
import { DynamicVehicleBodyTypeDTO } from "./VehicleTypeDTO";
|
|
6
5
|
import { VehicleMediaCreateDTO, VehicleMediaUpdateDTO } from "./VehicleMedia";
|
|
6
|
+
import { VehicleFilter, VehicleOptions, VehicleUniqueFilter } from "./VehicleFilterDTO";
|
|
7
7
|
export declare class VehicleGetDTO {
|
|
8
8
|
filter?: VehicleFilter;
|
|
9
9
|
options?: VehicleOptions;
|
|
@@ -202,6 +202,7 @@ export declare class VehicleFilter extends BaseFilter {
|
|
|
202
202
|
emi?: NumberRange;
|
|
203
203
|
status?: string | string[];
|
|
204
204
|
includeReserved?: boolean;
|
|
205
|
+
includeSelfReserved?: boolean;
|
|
205
206
|
includeSold?: boolean;
|
|
206
207
|
includeDraft?: boolean;
|
|
207
208
|
features?: string | string[];
|
|
@@ -657,6 +657,11 @@ __decorate([
|
|
|
657
657
|
(0, class_validator_1.IsBoolean)(),
|
|
658
658
|
__metadata("design:type", Boolean)
|
|
659
659
|
], VehicleFilter.prototype, "includeReserved", void 0);
|
|
660
|
+
__decorate([
|
|
661
|
+
(0, class_validator_1.IsOptional)(),
|
|
662
|
+
(0, class_validator_1.IsBoolean)(),
|
|
663
|
+
__metadata("design:type", Boolean)
|
|
664
|
+
], VehicleFilter.prototype, "includeSelfReserved", void 0);
|
|
660
665
|
__decorate([
|
|
661
666
|
(0, class_validator_1.IsOptional)(),
|
|
662
667
|
(0, class_validator_1.IsBoolean)(),
|
|
@@ -5,7 +5,7 @@ import { VehicleMake } from "../../models/VehicleMake";
|
|
|
5
5
|
import { VehicleMetaData } from "../../models/VehicleMetaData";
|
|
6
6
|
import { VehicleModel } from "../../models/VehicleModel";
|
|
7
7
|
import { VehicleCategory } from "../../models/VehicleCategory";
|
|
8
|
-
import { BaseFilter,
|
|
8
|
+
import { BaseFilter, PaginationOptions } from "../../../global/utilities";
|
|
9
9
|
import { VehicleCategorySelectFields } from "./dto/VehicleFilterDTO";
|
|
10
10
|
export type VehicleMakeSelectFields = keyof VehicleMake;
|
|
11
11
|
export type VehicleModelSelectFields = keyof VehicleModel;
|
|
@@ -156,65 +156,6 @@ export declare class VehicleFeatureCategoryOptions extends PaginationOptions {
|
|
|
156
156
|
static fromPlain(plain: Record<string, unknown>): VehicleFeatureOptions;
|
|
157
157
|
static toPlain(entity: any): Record<string, unknown>;
|
|
158
158
|
}
|
|
159
|
-
export declare class VehicleFilter extends BaseFilter {
|
|
160
|
-
referenceNumber?: string | string[];
|
|
161
|
-
make?: string | string[];
|
|
162
|
-
model?: string | string[];
|
|
163
|
-
bodyType?: string | string[];
|
|
164
|
-
vin?: string | string[];
|
|
165
|
-
chassisNumber?: string | string[];
|
|
166
|
-
mileage?: NumberRange;
|
|
167
|
-
fuelType?: string | string[];
|
|
168
|
-
color?: string | string[];
|
|
169
|
-
engineCapacity?: string | string[];
|
|
170
|
-
numberOfCylinders?: NumberRange;
|
|
171
|
-
cylinderCapacity?: NumberRange;
|
|
172
|
-
doors?: NumberRange;
|
|
173
|
-
seats?: NumberRange;
|
|
174
|
-
keys?: NumberRange;
|
|
175
|
-
wheelsType?: string | string[];
|
|
176
|
-
airbags?: NumberRange;
|
|
177
|
-
transmission?: string | string[];
|
|
178
|
-
driveType?: string | string[];
|
|
179
|
-
emissions?: string | string[];
|
|
180
|
-
year?: NumberRange;
|
|
181
|
-
price?: NumberRange;
|
|
182
|
-
includeReserved?: boolean;
|
|
183
|
-
includeSelfReserved?: boolean;
|
|
184
|
-
includeSold?: boolean;
|
|
185
|
-
includeDraft?: boolean;
|
|
186
|
-
status?: string | string[];
|
|
187
|
-
features?: string | string[];
|
|
188
|
-
search?: string;
|
|
189
|
-
validate?: (shouldValidate?: boolean) => string[];
|
|
190
|
-
constructor(shouldIncludeValidate?: boolean);
|
|
191
|
-
static fromPlain(plain: Record<string, unknown>): VehicleFilter;
|
|
192
|
-
static toPlain(entity: any): Record<string, unknown>;
|
|
193
|
-
}
|
|
194
|
-
export declare class VehicleUniqueFilter {
|
|
195
|
-
id?: string;
|
|
196
|
-
referenceNumber?: string;
|
|
197
|
-
vin?: string;
|
|
198
|
-
chassisNumber?: string;
|
|
199
|
-
validate(): string[];
|
|
200
|
-
static fromPlain(plain: Record<string, unknown>): VehicleUniqueFilter;
|
|
201
|
-
static toPlain(entity: any): Record<string, unknown>;
|
|
202
|
-
}
|
|
203
|
-
export type VehicleSort = Partial<Record<keyof Pick<Vehicle, "referenceNumber" | "mileage" | "year" | "createdAt" | "updatedAt" | "engineCapacity" | "doors" | "seats" | "keys" | "transmission" | "driveType" | "price" | "status">, "asc" | "desc">>;
|
|
204
|
-
export declare class VehicleOptions extends PaginationOptions {
|
|
205
|
-
sort?: VehicleSort;
|
|
206
|
-
select?: (VehicleSelectFields | `make.${VehicleMakeSelectFields}` | `model.${VehicleModelSelectFields}` | `bodyType.${VehicleBodyTypeSelectFields}` | `features.${VehicleFeatureSelectFields}` | `metaData.${VehicleMetaDataSelectFields}`)[];
|
|
207
|
-
withMake?: boolean;
|
|
208
|
-
withModel?: boolean;
|
|
209
|
-
withBodyType?: boolean;
|
|
210
|
-
withFeatures?: boolean;
|
|
211
|
-
withMetaData?: boolean;
|
|
212
|
-
withFinance?: boolean;
|
|
213
|
-
validate?: (shouldValidate?: boolean) => string[];
|
|
214
|
-
constructor(shouldIncludeValidate?: boolean);
|
|
215
|
-
static fromPlain(plain: Record<string, unknown>): VehicleOptions;
|
|
216
|
-
static toPlain(entity: any): Record<string, unknown>;
|
|
217
|
-
}
|
|
218
159
|
export declare class VehicleCategoryFilter extends BaseFilter {
|
|
219
160
|
id?: string | string[];
|
|
220
161
|
slug?: string | string[];
|
|
@@ -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.VehicleCategoryOptions = exports.VehicleCategoryUniqueFilter = exports.VehicleCategoryFilter = exports.
|
|
12
|
+
exports.VehicleCategoryOptions = exports.VehicleCategoryUniqueFilter = exports.VehicleCategoryFilter = exports.VehicleFeatureCategoryOptions = exports.VehicleFeatureCategoryUniqueFilter = exports.VehicleFeatureCategoryFilter = exports.VehicleFeatureOptions = exports.VehicleFeatureUniqueFilter = exports.VehicleFeatureFilter = exports.VehicleBodyTypeOptions = exports.VehicleBodyTypeUniqueFilter = exports.VehicleBodyTypeFilter = exports.VehicleModelOptions = exports.VehicleModelUniqueFilter = exports.VehicleModelFilter = exports.VehicleMakeOptions = exports.VehicleMakeUniqueFilter = exports.VehicleMakeFilter = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const utilities_1 = require("../../../global/utilities");
|
|
@@ -434,239 +434,6 @@ class VehicleFeatureCategoryOptions extends utilities_1.PaginationOptions {
|
|
|
434
434
|
}
|
|
435
435
|
exports.VehicleFeatureCategoryOptions = VehicleFeatureCategoryOptions;
|
|
436
436
|
// -----------------------------------------------------CAR-------------------------------------------------------------------------
|
|
437
|
-
class VehicleFilter extends utilities_1.BaseFilter {
|
|
438
|
-
constructor(shouldIncludeValidate = true) {
|
|
439
|
-
super();
|
|
440
|
-
if (shouldIncludeValidate) {
|
|
441
|
-
this.validate = (shouldValidate = true) => {
|
|
442
|
-
if (!shouldValidate) {
|
|
443
|
-
return [];
|
|
444
|
-
}
|
|
445
|
-
const errors = (0, class_validator_1.validateSync)(this);
|
|
446
|
-
return errors
|
|
447
|
-
.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); })
|
|
448
|
-
.flat();
|
|
449
|
-
};
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
static fromPlain(plain) {
|
|
453
|
-
return (0, class_transformer_1.plainToClass)(VehicleFilter, plain);
|
|
454
|
-
}
|
|
455
|
-
static toPlain(entity) {
|
|
456
|
-
return (0, class_transformer_1.instanceToPlain)(entity);
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
__decorate([
|
|
460
|
-
(0, class_validator_1.IsOptional)(),
|
|
461
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
462
|
-
__metadata("design:type", Object)
|
|
463
|
-
], VehicleFilter.prototype, "referenceNumber", void 0);
|
|
464
|
-
__decorate([
|
|
465
|
-
(0, class_validator_1.IsOptional)(),
|
|
466
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
467
|
-
__metadata("design:type", Object)
|
|
468
|
-
], VehicleFilter.prototype, "make", void 0);
|
|
469
|
-
__decorate([
|
|
470
|
-
(0, class_validator_1.IsOptional)(),
|
|
471
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
472
|
-
__metadata("design:type", Object)
|
|
473
|
-
], VehicleFilter.prototype, "model", void 0);
|
|
474
|
-
__decorate([
|
|
475
|
-
(0, class_validator_1.IsOptional)(),
|
|
476
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
477
|
-
__metadata("design:type", Object)
|
|
478
|
-
], VehicleFilter.prototype, "bodyType", void 0);
|
|
479
|
-
__decorate([
|
|
480
|
-
(0, class_validator_1.IsOptional)(),
|
|
481
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
482
|
-
__metadata("design:type", Object)
|
|
483
|
-
], VehicleFilter.prototype, "vin", void 0);
|
|
484
|
-
__decorate([
|
|
485
|
-
(0, class_validator_1.IsOptional)(),
|
|
486
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
487
|
-
__metadata("design:type", Object)
|
|
488
|
-
], VehicleFilter.prototype, "chassisNumber", void 0);
|
|
489
|
-
__decorate([
|
|
490
|
-
(0, class_validator_1.IsOptional)(),
|
|
491
|
-
(0, class_validator_1.ValidateNested)(),
|
|
492
|
-
(0, class_transformer_1.Type)(() => utilities_1.NumberRange),
|
|
493
|
-
__metadata("design:type", utilities_1.NumberRange)
|
|
494
|
-
], VehicleFilter.prototype, "mileage", void 0);
|
|
495
|
-
__decorate([
|
|
496
|
-
(0, class_validator_1.IsOptional)(),
|
|
497
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
498
|
-
__metadata("design:type", Object)
|
|
499
|
-
], VehicleFilter.prototype, "fuelType", void 0);
|
|
500
|
-
__decorate([
|
|
501
|
-
(0, class_validator_1.IsOptional)(),
|
|
502
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
503
|
-
__metadata("design:type", Object)
|
|
504
|
-
], VehicleFilter.prototype, "color", void 0);
|
|
505
|
-
__decorate([
|
|
506
|
-
(0, class_validator_1.IsOptional)(),
|
|
507
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
508
|
-
__metadata("design:type", Object)
|
|
509
|
-
], VehicleFilter.prototype, "engineCapacity", void 0);
|
|
510
|
-
__decorate([
|
|
511
|
-
(0, class_validator_1.IsOptional)(),
|
|
512
|
-
(0, class_validator_1.ValidateNested)(),
|
|
513
|
-
(0, class_transformer_1.Type)(() => utilities_1.NumberRange),
|
|
514
|
-
__metadata("design:type", utilities_1.NumberRange)
|
|
515
|
-
], VehicleFilter.prototype, "numberOfCylinders", void 0);
|
|
516
|
-
__decorate([
|
|
517
|
-
(0, class_validator_1.IsOptional)(),
|
|
518
|
-
(0, class_validator_1.ValidateNested)(),
|
|
519
|
-
(0, class_transformer_1.Type)(() => utilities_1.NumberRange),
|
|
520
|
-
__metadata("design:type", utilities_1.NumberRange)
|
|
521
|
-
], VehicleFilter.prototype, "cylinderCapacity", void 0);
|
|
522
|
-
__decorate([
|
|
523
|
-
(0, class_validator_1.IsOptional)(),
|
|
524
|
-
(0, class_validator_1.ValidateNested)(),
|
|
525
|
-
(0, class_transformer_1.Type)(() => utilities_1.NumberRange),
|
|
526
|
-
__metadata("design:type", utilities_1.NumberRange)
|
|
527
|
-
], VehicleFilter.prototype, "doors", void 0);
|
|
528
|
-
__decorate([
|
|
529
|
-
(0, class_validator_1.IsOptional)(),
|
|
530
|
-
(0, class_validator_1.ValidateNested)(),
|
|
531
|
-
(0, class_transformer_1.Type)(() => utilities_1.NumberRange),
|
|
532
|
-
__metadata("design:type", utilities_1.NumberRange)
|
|
533
|
-
], VehicleFilter.prototype, "seats", void 0);
|
|
534
|
-
__decorate([
|
|
535
|
-
(0, class_validator_1.IsOptional)(),
|
|
536
|
-
(0, class_validator_1.ValidateNested)(),
|
|
537
|
-
(0, class_transformer_1.Type)(() => utilities_1.NumberRange),
|
|
538
|
-
__metadata("design:type", utilities_1.NumberRange)
|
|
539
|
-
], VehicleFilter.prototype, "keys", void 0);
|
|
540
|
-
__decorate([
|
|
541
|
-
(0, class_validator_1.IsOptional)(),
|
|
542
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
543
|
-
__metadata("design:type", Object)
|
|
544
|
-
], VehicleFilter.prototype, "wheelsType", void 0);
|
|
545
|
-
__decorate([
|
|
546
|
-
(0, class_validator_1.IsOptional)(),
|
|
547
|
-
(0, class_validator_1.ValidateNested)(),
|
|
548
|
-
(0, class_transformer_1.Type)(() => utilities_1.NumberRange),
|
|
549
|
-
__metadata("design:type", utilities_1.NumberRange)
|
|
550
|
-
], VehicleFilter.prototype, "airbags", void 0);
|
|
551
|
-
__decorate([
|
|
552
|
-
(0, class_validator_1.IsOptional)(),
|
|
553
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
554
|
-
__metadata("design:type", Object)
|
|
555
|
-
], VehicleFilter.prototype, "transmission", void 0);
|
|
556
|
-
__decorate([
|
|
557
|
-
(0, class_validator_1.IsOptional)(),
|
|
558
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
559
|
-
__metadata("design:type", Object)
|
|
560
|
-
], VehicleFilter.prototype, "driveType", void 0);
|
|
561
|
-
__decorate([
|
|
562
|
-
(0, class_validator_1.IsOptional)(),
|
|
563
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
564
|
-
__metadata("design:type", Object)
|
|
565
|
-
], VehicleFilter.prototype, "emissions", void 0);
|
|
566
|
-
__decorate([
|
|
567
|
-
(0, class_validator_1.IsOptional)(),
|
|
568
|
-
(0, class_validator_1.ValidateNested)(),
|
|
569
|
-
(0, class_transformer_1.Type)(() => utilities_1.NumberRange),
|
|
570
|
-
__metadata("design:type", utilities_1.NumberRange)
|
|
571
|
-
], VehicleFilter.prototype, "year", void 0);
|
|
572
|
-
__decorate([
|
|
573
|
-
(0, class_validator_1.IsOptional)(),
|
|
574
|
-
(0, class_validator_1.ValidateNested)(),
|
|
575
|
-
(0, class_transformer_1.Type)(() => utilities_1.NumberRange),
|
|
576
|
-
__metadata("design:type", utilities_1.NumberRange)
|
|
577
|
-
], VehicleFilter.prototype, "price", void 0);
|
|
578
|
-
__decorate([
|
|
579
|
-
(0, class_validator_1.IsOptional)(),
|
|
580
|
-
(0, class_validator_1.IsBoolean)(),
|
|
581
|
-
__metadata("design:type", Boolean)
|
|
582
|
-
], VehicleFilter.prototype, "includeReserved", void 0);
|
|
583
|
-
__decorate([
|
|
584
|
-
(0, class_validator_1.IsOptional)(),
|
|
585
|
-
(0, class_validator_1.IsBoolean)(),
|
|
586
|
-
__metadata("design:type", Boolean)
|
|
587
|
-
], VehicleFilter.prototype, "includeSelfReserved", void 0);
|
|
588
|
-
__decorate([
|
|
589
|
-
(0, class_validator_1.IsOptional)(),
|
|
590
|
-
(0, class_validator_1.IsBoolean)(),
|
|
591
|
-
__metadata("design:type", Boolean)
|
|
592
|
-
], VehicleFilter.prototype, "includeSold", void 0);
|
|
593
|
-
__decorate([
|
|
594
|
-
(0, class_validator_1.IsOptional)(),
|
|
595
|
-
(0, class_validator_1.IsBoolean)(),
|
|
596
|
-
__metadata("design:type", Boolean)
|
|
597
|
-
], VehicleFilter.prototype, "includeDraft", void 0);
|
|
598
|
-
__decorate([
|
|
599
|
-
(0, class_validator_1.IsOptional)(),
|
|
600
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
601
|
-
__metadata("design:type", Object)
|
|
602
|
-
], VehicleFilter.prototype, "status", void 0);
|
|
603
|
-
__decorate([
|
|
604
|
-
(0, class_validator_1.IsOptional)(),
|
|
605
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
606
|
-
__metadata("design:type", Object)
|
|
607
|
-
], VehicleFilter.prototype, "features", void 0);
|
|
608
|
-
__decorate([
|
|
609
|
-
(0, class_validator_1.IsOptional)(),
|
|
610
|
-
(0, class_validator_1.IsString)(),
|
|
611
|
-
__metadata("design:type", String)
|
|
612
|
-
], VehicleFilter.prototype, "search", void 0);
|
|
613
|
-
exports.VehicleFilter = VehicleFilter;
|
|
614
|
-
class VehicleUniqueFilter {
|
|
615
|
-
validate() {
|
|
616
|
-
const errors = (0, class_validator_1.validateSync)(this);
|
|
617
|
-
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
618
|
-
}
|
|
619
|
-
static fromPlain(plain) {
|
|
620
|
-
return (0, class_transformer_1.plainToClass)(VehicleUniqueFilter, plain);
|
|
621
|
-
}
|
|
622
|
-
static toPlain(entity) {
|
|
623
|
-
return (0, class_transformer_1.instanceToPlain)(entity);
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
__decorate([
|
|
627
|
-
(0, class_validator_1.IsOptional)(),
|
|
628
|
-
(0, class_validator_1.IsString)(),
|
|
629
|
-
__metadata("design:type", String)
|
|
630
|
-
], VehicleUniqueFilter.prototype, "id", void 0);
|
|
631
|
-
__decorate([
|
|
632
|
-
(0, class_validator_1.IsOptional)(),
|
|
633
|
-
(0, class_validator_1.IsString)(),
|
|
634
|
-
__metadata("design:type", String)
|
|
635
|
-
], VehicleUniqueFilter.prototype, "referenceNumber", void 0);
|
|
636
|
-
__decorate([
|
|
637
|
-
(0, class_validator_1.IsOptional)(),
|
|
638
|
-
(0, class_validator_1.IsString)(),
|
|
639
|
-
__metadata("design:type", String)
|
|
640
|
-
], VehicleUniqueFilter.prototype, "vin", void 0);
|
|
641
|
-
__decorate([
|
|
642
|
-
(0, class_validator_1.IsOptional)(),
|
|
643
|
-
(0, class_validator_1.IsString)(),
|
|
644
|
-
__metadata("design:type", String)
|
|
645
|
-
], VehicleUniqueFilter.prototype, "chassisNumber", void 0);
|
|
646
|
-
exports.VehicleUniqueFilter = VehicleUniqueFilter;
|
|
647
|
-
class VehicleOptions extends utilities_1.PaginationOptions {
|
|
648
|
-
constructor(shouldIncludeValidate = true) {
|
|
649
|
-
super();
|
|
650
|
-
if (shouldIncludeValidate) {
|
|
651
|
-
this.validate = (shouldValidate = true) => {
|
|
652
|
-
if (!shouldValidate) {
|
|
653
|
-
return [];
|
|
654
|
-
}
|
|
655
|
-
const errors = (0, class_validator_1.validateSync)(this);
|
|
656
|
-
return errors
|
|
657
|
-
.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); })
|
|
658
|
-
.flat();
|
|
659
|
-
};
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
static fromPlain(plain) {
|
|
663
|
-
return (0, class_transformer_1.plainToClass)(VehicleOptions, plain);
|
|
664
|
-
}
|
|
665
|
-
static toPlain(entity) {
|
|
666
|
-
return (0, class_transformer_1.instanceToPlain)(entity);
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
exports.VehicleOptions = VehicleOptions;
|
|
670
437
|
class VehicleCategoryFilter extends utilities_1.BaseFilter {
|
|
671
438
|
validate() {
|
|
672
439
|
const errors = (0, class_validator_1.validateSync)(this);
|
package/package.json
CHANGED