@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.
- package/dist/core/error-handling/AppError.d.ts +3 -1
- package/dist/core/error-handling/AppError.js +2 -0
- package/dist/core/network/endpoint-config.d.ts +5 -0
- package/dist/core/network/endpoint-config.js +7 -2
- package/dist/features/auth/data/dto/AuthDTO.d.ts +20 -0
- package/dist/features/auth/data/dto/AuthDTO.js +47 -0
- package/dist/features/auth/data/index.d.ts +1 -0
- package/dist/features/auth/data/index.js +17 -0
- package/dist/features/auth/index.d.ts +1 -0
- package/dist/features/auth/index.js +17 -0
- package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.d.ts +21 -0
- package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.js +56 -1
- package/dist/features/index.d.ts +2 -1
- package/dist/features/index.js +2 -1
- package/dist/features/lead/data/dto/lead_dto.d.ts +5 -3
- package/dist/features/lead/data/dto/lead_dto.js +20 -8
- package/dist/features/sell-car-request/data/dto/SellCarRequestDTO.d.ts +154 -0
- package/dist/features/sell-car-request/data/dto/SellCarRequestDTO.js +444 -0
- package/dist/features/sell-car-request/data/index.d.ts +1 -0
- package/dist/features/sell-car-request/data/index.js +17 -0
- package/dist/features/sell-car-request/index.d.ts +1 -0
- package/dist/features/sell-car-request/index.js +17 -0
- package/dist/features/vehicle/data/dto/BaseDTO.d.ts +3 -4
- package/dist/features/vehicle/data/dto/BaseDTO.js +6 -14
- package/dist/features/vehicle/data/dto/VehicleFilterDTO.d.ts +1 -0
- package/dist/features/vehicle/data/dto/VehicleMedia.d.ts +1 -0
- package/dist/features/vehicle/data/dto/VehicleMedia.js +4 -0
- package/dist/features/vehicle/data/utilities.js +0 -1202
- package/dist/features/vehicle-reservations/data/dto/VehicleReservationDTO.d.ts +7 -3
- package/dist/features/vehicle-reservations/data/dto/VehicleReservationDTO.js +14 -2
- package/package.json +1 -1
|
@@ -13,83 +13,6 @@ exports.VehicleCategoryOptions = exports.VehicleCategoryUniqueFilter = exports.V
|
|
|
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");
|
|
16
|
-
// export function IsDateOrConvertible(validationOptions?: ValidationOptions) {
|
|
17
|
-
// return function (object: Record<string, unknown>, propertyName: string): void {
|
|
18
|
-
// registerDecorator({
|
|
19
|
-
// name: "isDateOrConvertible",
|
|
20
|
-
// target: object.constructor,
|
|
21
|
-
// propertyName: propertyName,
|
|
22
|
-
// options: validationOptions,
|
|
23
|
-
// validator: {
|
|
24
|
-
// validate(value: any, _args: ValidationArguments) {
|
|
25
|
-
// return (
|
|
26
|
-
// value instanceof Date ||
|
|
27
|
-
// typeof value === "string" ||
|
|
28
|
-
// typeof value === "number"
|
|
29
|
-
// )
|
|
30
|
-
// },
|
|
31
|
-
// defaultMessage(args: ValidationArguments) {
|
|
32
|
-
// return `${args.property} must be a Date, string, or number`
|
|
33
|
-
// }
|
|
34
|
-
// }
|
|
35
|
-
// })
|
|
36
|
-
// }
|
|
37
|
-
// }
|
|
38
|
-
// export class DateFilter {
|
|
39
|
-
// @IsOptional()
|
|
40
|
-
// @Validate(IsDateOrConvertible)
|
|
41
|
-
// from?: Date | string | number
|
|
42
|
-
// @IsOptional()
|
|
43
|
-
// @Validate(IsDateOrConvertible)
|
|
44
|
-
// to?: Date | string | number
|
|
45
|
-
// }
|
|
46
|
-
// export class NumberRange {
|
|
47
|
-
// @IsOptional()
|
|
48
|
-
// @IsNumber()
|
|
49
|
-
// min?: number;
|
|
50
|
-
// @IsOptional()
|
|
51
|
-
// @IsNumber()
|
|
52
|
-
// max?: number;
|
|
53
|
-
// }
|
|
54
|
-
// export class BaseFilter {
|
|
55
|
-
// @IsOptional()
|
|
56
|
-
// @IsString({ each: true })
|
|
57
|
-
// id?: string | string[]
|
|
58
|
-
// @IsOptional()
|
|
59
|
-
// @IsString({ each: true })
|
|
60
|
-
// createdBy?: string | string[] // User id
|
|
61
|
-
// @IsOptional()
|
|
62
|
-
// @IsString({ each: true })
|
|
63
|
-
// updatedBy?: string | string[] // User id
|
|
64
|
-
// @IsOptional()
|
|
65
|
-
// @IsString({ each: true })
|
|
66
|
-
// deletedBy?: string | string[] // User id
|
|
67
|
-
// @IsOptional()
|
|
68
|
-
// @IsBoolean()
|
|
69
|
-
// isDeleted?: boolean// true or false
|
|
70
|
-
// @IsOptional()
|
|
71
|
-
// @IsBoolean()
|
|
72
|
-
// isActive?: boolean // true or false
|
|
73
|
-
// @IsOptional()
|
|
74
|
-
// @Validate(DateFilter)
|
|
75
|
-
// createdAt?: DateFilter
|
|
76
|
-
// @IsOptional()
|
|
77
|
-
// @Validate(DateFilter)
|
|
78
|
-
// updatedAt?: DateFilter
|
|
79
|
-
// @IsOptional()
|
|
80
|
-
// @Validate(DateFilter)
|
|
81
|
-
// deletedAt?: DateFilter
|
|
82
|
-
// }
|
|
83
|
-
// export class PaginationOptions {
|
|
84
|
-
// @IsOptional()
|
|
85
|
-
// @IsNumber()
|
|
86
|
-
// @Max(100)
|
|
87
|
-
// limit?: number;
|
|
88
|
-
// @IsOptional()
|
|
89
|
-
// @IsNumber()
|
|
90
|
-
// page?: number;
|
|
91
|
-
// }
|
|
92
|
-
// -----------------------------------------------------CAR MAKE-------------------------------------------------------------------------
|
|
93
16
|
class VehicleMakeFilter extends utilities_1.BaseFilter {
|
|
94
17
|
validate() {
|
|
95
18
|
const errors = (0, class_validator_1.validateSync)(this);
|
|
@@ -724,371 +647,6 @@ class VehicleOptions extends utilities_1.PaginationOptions {
|
|
|
724
647
|
}
|
|
725
648
|
}
|
|
726
649
|
exports.VehicleOptions = VehicleOptions;
|
|
727
|
-
// export type VehicleMakeSelectFields = keyof VehicleMake;
|
|
728
|
-
// export type VehicleModelSelectFields = keyof VehicleModel;
|
|
729
|
-
// export type VehicleSelectFields = keyof Vehicle;
|
|
730
|
-
// export type VehicleBodyTypeSelectFields = keyof VehicleBodyType;
|
|
731
|
-
// export type VehicleFeatureSelectFields = keyof VehicleFeature;
|
|
732
|
-
// export type VehicleCategorySelectFields = keyof VehicleCategory;
|
|
733
|
-
// export type VehicleFeatureCategorySelectFields = keyof VehicleFeatureCategory;
|
|
734
|
-
// export type VehicleMetaDataSelectFields = keyof VehicleMetaData;
|
|
735
|
-
// // -----------------------------------------------------CAR MAKE-------------------------------------------------------------------------
|
|
736
|
-
// export class VehicleMakeFilter extends BaseFilter {
|
|
737
|
-
// @IsOptional()
|
|
738
|
-
// @IsString({ each: true })
|
|
739
|
-
// id?: string | string[];
|
|
740
|
-
// @IsOptional()
|
|
741
|
-
// @IsString({ each: true })
|
|
742
|
-
// slug?: string | string[];
|
|
743
|
-
// @IsOptional()
|
|
744
|
-
// @IsString()
|
|
745
|
-
// name?: string;
|
|
746
|
-
// @IsOptional()
|
|
747
|
-
// @IsString({ each: true })
|
|
748
|
-
// metaKeywords?: string;
|
|
749
|
-
// @IsOptional()
|
|
750
|
-
// @IsString({ each: true })
|
|
751
|
-
// models?: string | string[]; // A list of model ids and/or names
|
|
752
|
-
// @IsOptional()
|
|
753
|
-
// @IsString({ each: true })
|
|
754
|
-
// vehicles?: string | string[]; // A list of vehicle ids and/or names
|
|
755
|
-
// @IsOptional()
|
|
756
|
-
// @IsString()
|
|
757
|
-
// search?: string; // A search string
|
|
758
|
-
// validate(): string[] {
|
|
759
|
-
// const errors = validateSync(this);
|
|
760
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
761
|
-
// }
|
|
762
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleMakeFilter {
|
|
763
|
-
// return plainToClass(VehicleMakeFilter, plain);
|
|
764
|
-
// }
|
|
765
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
766
|
-
// return instanceToPlain(entity);
|
|
767
|
-
// }
|
|
768
|
-
// }
|
|
769
|
-
// // This filter is used to get a unique vehicle make by unique fields
|
|
770
|
-
// export class VehicleMakeUniqueFilter extends BaseFilter {
|
|
771
|
-
// @IsOptional()
|
|
772
|
-
// @IsString()
|
|
773
|
-
// id?: string;
|
|
774
|
-
// @IsOptional()
|
|
775
|
-
// @IsString()
|
|
776
|
-
// slug?: string;
|
|
777
|
-
// @IsOptional()
|
|
778
|
-
// @IsString()
|
|
779
|
-
// name?: string;
|
|
780
|
-
// validate(): string[] {
|
|
781
|
-
// const errors = validateSync(this);
|
|
782
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
783
|
-
// }
|
|
784
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleMakeFilter {
|
|
785
|
-
// return plainToClass(VehicleMakeFilter, plain);
|
|
786
|
-
// }
|
|
787
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
788
|
-
// return instanceToPlain(entity);
|
|
789
|
-
// }
|
|
790
|
-
// }
|
|
791
|
-
// export type VehicleMakeSort = Record<
|
|
792
|
-
// keyof Pick<VehicleMake, "name" | "isActive" | "createdAt" | "updatedAt">,
|
|
793
|
-
// "asc" | "desc"
|
|
794
|
-
// >;
|
|
795
|
-
// export class VehicleMakeOptions extends PaginationOptions {
|
|
796
|
-
// sort?: VehicleMakeSort;
|
|
797
|
-
// withModels?: boolean;
|
|
798
|
-
// withVehicles?: boolean;
|
|
799
|
-
// select?: (VehicleMakeSelectFields | `models.${VehicleModelSelectFields}` | `vehicles.${VehicleSelectFields}`)[];
|
|
800
|
-
// validate(): string[] {
|
|
801
|
-
// const errors = validateSync(this);
|
|
802
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
803
|
-
// }
|
|
804
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleMakeOptions {
|
|
805
|
-
// return plainToClass(VehicleMakeOptions, plain);
|
|
806
|
-
// }
|
|
807
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
808
|
-
// return instanceToPlain(entity);
|
|
809
|
-
// }
|
|
810
|
-
// }
|
|
811
|
-
// // -----------------------------------------------------CAR MODEL-------------------------------------------------------------------------
|
|
812
|
-
// export class VehicleModelFilter extends BaseFilter {
|
|
813
|
-
// @IsOptional()
|
|
814
|
-
// @IsString({ each: true })
|
|
815
|
-
// id?: string | string[];
|
|
816
|
-
// @IsOptional()
|
|
817
|
-
// @IsString({ each: true })
|
|
818
|
-
// slug?: string | string[];
|
|
819
|
-
// @IsOptional()
|
|
820
|
-
// @IsString()
|
|
821
|
-
// name?: string;
|
|
822
|
-
// @IsOptional()
|
|
823
|
-
// @IsString({ each: true })
|
|
824
|
-
// metaKeywords?: string;
|
|
825
|
-
// @IsOptional()
|
|
826
|
-
// @IsString({ each: true })
|
|
827
|
-
// makes?: string | string[]; // A list of make ids and/or names
|
|
828
|
-
// @IsOptional()
|
|
829
|
-
// @IsString({ each: true })
|
|
830
|
-
// vehicles?: string | string[]; // A list of vehicle ids and/or names
|
|
831
|
-
// search?: string; // A search string
|
|
832
|
-
// validate(): string[] {
|
|
833
|
-
// const errors = validateSync(this);
|
|
834
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
835
|
-
// }
|
|
836
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleModelFilter {
|
|
837
|
-
// return plainToClass(VehicleModelFilter, plain);
|
|
838
|
-
// }
|
|
839
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
840
|
-
// return instanceToPlain(entity);
|
|
841
|
-
// }
|
|
842
|
-
// }
|
|
843
|
-
// export class VehicleModelUniqueFilter extends BaseFilter {
|
|
844
|
-
// @IsOptional()
|
|
845
|
-
// @IsString()
|
|
846
|
-
// id?: string;
|
|
847
|
-
// @IsOptional()
|
|
848
|
-
// @IsString()
|
|
849
|
-
// slug?: string;
|
|
850
|
-
// @IsOptional()
|
|
851
|
-
// @IsString()
|
|
852
|
-
// name?: string;
|
|
853
|
-
// validate(): string[] {
|
|
854
|
-
// const errors = validateSync(this);
|
|
855
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
856
|
-
// }
|
|
857
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleModelUniqueFilter {
|
|
858
|
-
// return plainToClass(VehicleModelUniqueFilter, plain);
|
|
859
|
-
// }
|
|
860
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
861
|
-
// return instanceToPlain(entity);
|
|
862
|
-
// }
|
|
863
|
-
// }
|
|
864
|
-
// export type VehicleModelSort = Record<
|
|
865
|
-
// keyof Pick<VehicleModel, "name" | "isActive" | "createdAt" | "updatedAt">,
|
|
866
|
-
// "asc" | "desc"
|
|
867
|
-
// >;
|
|
868
|
-
// export class VehicleModelOptions extends PaginationOptions {
|
|
869
|
-
// sort?: VehicleModelSort;
|
|
870
|
-
// withVehicles?: boolean;
|
|
871
|
-
// withMake?: boolean;
|
|
872
|
-
// select?: (VehicleModelSelectFields | `vehicles.${VehicleSelectFields}` | `make.${VehicleMakeSelectFields}`)[];
|
|
873
|
-
// validate(): string[] {
|
|
874
|
-
// const errors = validateSync(this);
|
|
875
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
876
|
-
// }
|
|
877
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleModelOptions {
|
|
878
|
-
// return plainToClass(VehicleModelOptions, plain);
|
|
879
|
-
// }
|
|
880
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
881
|
-
// return instanceToPlain(entity);
|
|
882
|
-
// }
|
|
883
|
-
// }
|
|
884
|
-
// // -----------------------------------------------------CAR BODY TYPE----------------------------------------------------------------
|
|
885
|
-
// export class VehicleBodyTypeFilter extends BaseFilter {
|
|
886
|
-
// @IsOptional()
|
|
887
|
-
// @IsString({ each: true })
|
|
888
|
-
// id?: string | string[];
|
|
889
|
-
// @IsOptional()
|
|
890
|
-
// @IsString({ each: true })
|
|
891
|
-
// slug?: string | string[];
|
|
892
|
-
// @IsOptional()
|
|
893
|
-
// @IsString()
|
|
894
|
-
// name?: string;
|
|
895
|
-
// @IsOptional()
|
|
896
|
-
// @IsString({ each: true })
|
|
897
|
-
// vehicles?: string | string[]; // A list of vehicle ids and/or names
|
|
898
|
-
// @IsOptional()
|
|
899
|
-
// @IsString({ each: true })
|
|
900
|
-
// models?: string | string[]; // A list of model ids and/or names
|
|
901
|
-
// @IsOptional()
|
|
902
|
-
// @IsString()
|
|
903
|
-
// search?: string; // A search string
|
|
904
|
-
// validate(): string[] {
|
|
905
|
-
// const errors = validateSync(this);
|
|
906
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
907
|
-
// }
|
|
908
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleModelFilter {
|
|
909
|
-
// return plainToClass(VehicleModelFilter, plain);
|
|
910
|
-
// }
|
|
911
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
912
|
-
// return instanceToPlain(entity);
|
|
913
|
-
// }
|
|
914
|
-
// }
|
|
915
|
-
// export class VehicleBodyTypeUniqueFilter {
|
|
916
|
-
// @IsOptional()
|
|
917
|
-
// @IsString()
|
|
918
|
-
// id?: string;
|
|
919
|
-
// @IsOptional()
|
|
920
|
-
// @IsString()
|
|
921
|
-
// slug?: string;
|
|
922
|
-
// @IsOptional()
|
|
923
|
-
// @IsString()
|
|
924
|
-
// name?: string;
|
|
925
|
-
// validate(): string[] {
|
|
926
|
-
// const errors = validateSync(this);
|
|
927
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
928
|
-
// }
|
|
929
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleModelFilter {
|
|
930
|
-
// return plainToClass(VehicleModelFilter, plain);
|
|
931
|
-
// }
|
|
932
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
933
|
-
// return instanceToPlain(entity);
|
|
934
|
-
// }
|
|
935
|
-
// }
|
|
936
|
-
// export type VehicleBodyTypeSort = Record<
|
|
937
|
-
// keyof Pick<VehicleBodyType, "name" | "isActive" | "createdAt" | "updatedAt">,
|
|
938
|
-
// "asc" | "desc"
|
|
939
|
-
// >;
|
|
940
|
-
// export class VehicleBodyTypeOptions extends PaginationOptions {
|
|
941
|
-
// sort?: VehicleBodyTypeSort;
|
|
942
|
-
// withVehicles?: boolean;
|
|
943
|
-
// select?: (VehicleBodyTypeSelectFields | `vehicles.${VehicleSelectFields}` | `models.${VehicleModelSelectFields}`)[];
|
|
944
|
-
// validate(): string[] {
|
|
945
|
-
// const errors = validateSync(this);
|
|
946
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
947
|
-
// }
|
|
948
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleModelOptions {
|
|
949
|
-
// return plainToClass(VehicleModelOptions, plain);
|
|
950
|
-
// }
|
|
951
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
952
|
-
// return instanceToPlain(entity);
|
|
953
|
-
// }
|
|
954
|
-
// }
|
|
955
|
-
// // -----------------------------------------------------CAR FEATURE----------------------------------------------------------------
|
|
956
|
-
// export class VehicleFeatureFilter extends BaseFilter {
|
|
957
|
-
// @IsOptional()
|
|
958
|
-
// @IsString({ each: true })
|
|
959
|
-
// id?: string | string[];
|
|
960
|
-
// @IsOptional()
|
|
961
|
-
// @IsString({ each: true })
|
|
962
|
-
// slug?: string | string[];
|
|
963
|
-
// @IsOptional()
|
|
964
|
-
// @IsString()
|
|
965
|
-
// name?: string;
|
|
966
|
-
// @IsOptional()
|
|
967
|
-
// @IsString({ each: true })
|
|
968
|
-
// categories?: string | string[]; // A list of vehicle ids and/or names
|
|
969
|
-
// @IsOptional()
|
|
970
|
-
// @IsString()
|
|
971
|
-
// search?: string; // A search string
|
|
972
|
-
// validate(): string[] {
|
|
973
|
-
// const errors = validateSync(this);
|
|
974
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
975
|
-
// }
|
|
976
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleModelFilter {
|
|
977
|
-
// return plainToClass(VehicleModelFilter, plain);
|
|
978
|
-
// }
|
|
979
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
980
|
-
// return instanceToPlain(entity);
|
|
981
|
-
// }
|
|
982
|
-
// }
|
|
983
|
-
// export class VehicleFeatureUniqueFilter {
|
|
984
|
-
// @IsOptional()
|
|
985
|
-
// @IsString()
|
|
986
|
-
// id?: string;
|
|
987
|
-
// @IsOptional()
|
|
988
|
-
// @IsString()
|
|
989
|
-
// slug?: string;
|
|
990
|
-
// @IsOptional()
|
|
991
|
-
// @IsString()
|
|
992
|
-
// name?: string;
|
|
993
|
-
// validate(): string[] {
|
|
994
|
-
// const errors = validateSync(this);
|
|
995
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
996
|
-
// }
|
|
997
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleModelFilter {
|
|
998
|
-
// return plainToClass(VehicleModelFilter, plain);
|
|
999
|
-
// }
|
|
1000
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1001
|
-
// return instanceToPlain(entity);
|
|
1002
|
-
// }
|
|
1003
|
-
// }
|
|
1004
|
-
// export type VehicleFeatureSort = Record<
|
|
1005
|
-
// keyof Pick<VehicleFeature, "name" | "isActive" | "createdAt" | "updatedAt">,
|
|
1006
|
-
// "asc" | "desc"
|
|
1007
|
-
// >;
|
|
1008
|
-
// export class VehicleFeatureOptions extends PaginationOptions {
|
|
1009
|
-
// sort?: VehicleFeatureSort;
|
|
1010
|
-
// withCategories?: boolean;
|
|
1011
|
-
// select?: (VehicleFeatureSelectFields | `categories.${VehicleCategorySelectFields}`)[];
|
|
1012
|
-
// validate(): string[] {
|
|
1013
|
-
// const errors = validateSync(this);
|
|
1014
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1015
|
-
// }
|
|
1016
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleFeatureOptions {
|
|
1017
|
-
// return plainToClass(VehicleFeatureOptions, plain);
|
|
1018
|
-
// }
|
|
1019
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1020
|
-
// return instanceToPlain(entity);
|
|
1021
|
-
// }
|
|
1022
|
-
// }
|
|
1023
|
-
// -----------------------------------------------------CAR FEATURE CATEGORY----------------------------------------------------------------
|
|
1024
|
-
// export class VehicleFeatureCategoryFilter extends BaseFilter {
|
|
1025
|
-
// @IsOptional()
|
|
1026
|
-
// @IsString({ each: true })
|
|
1027
|
-
// id?: string | string[];
|
|
1028
|
-
// @IsOptional()
|
|
1029
|
-
// @IsString({ each: true })
|
|
1030
|
-
// slug?: string | string[];
|
|
1031
|
-
// @IsOptional()
|
|
1032
|
-
// @IsString()
|
|
1033
|
-
// name?: string;
|
|
1034
|
-
// @IsOptional()
|
|
1035
|
-
// @IsString({ each: true })
|
|
1036
|
-
// features?: string | string[]; // A list of vehicle ids and/or names
|
|
1037
|
-
// @IsOptional()
|
|
1038
|
-
// @IsString()
|
|
1039
|
-
// search?: string; // A search string
|
|
1040
|
-
// validate(): string[] {
|
|
1041
|
-
// const errors = validateSync(this);
|
|
1042
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1043
|
-
// }
|
|
1044
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleFeatureCategoryFilter {
|
|
1045
|
-
// return plainToClass(VehicleFeatureCategoryFilter, plain);
|
|
1046
|
-
// }
|
|
1047
|
-
// static toPlain(entity: VehicleFeatureCategoryFilter): Record<string, unknown> {
|
|
1048
|
-
// return instanceToPlain(entity);
|
|
1049
|
-
// }
|
|
1050
|
-
// }
|
|
1051
|
-
// export class VehicleFeatureCategoryUniqueFilter {
|
|
1052
|
-
// @IsOptional()
|
|
1053
|
-
// @IsString()
|
|
1054
|
-
// id?: string;
|
|
1055
|
-
// @IsOptional()
|
|
1056
|
-
// @IsString()
|
|
1057
|
-
// slug?: string;
|
|
1058
|
-
// @IsOptional()
|
|
1059
|
-
// @IsString()
|
|
1060
|
-
// name?: string;
|
|
1061
|
-
// validate(): string[] {
|
|
1062
|
-
// const errors = validateSync(this);
|
|
1063
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1064
|
-
// }
|
|
1065
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleFeatureCategoryUniqueFilter {
|
|
1066
|
-
// return plainToClass(VehicleFeatureCategoryUniqueFilter, plain);
|
|
1067
|
-
// }
|
|
1068
|
-
// static toPlain(entity: VehicleFeatureCategoryUniqueFilter): Record<string, unknown> {
|
|
1069
|
-
// return instanceToPlain(entity);
|
|
1070
|
-
// }
|
|
1071
|
-
// }
|
|
1072
|
-
// export type VehicleFeatureCategorySort = Record<
|
|
1073
|
-
// keyof Pick<VehicleFeatureCategory, "name" | "isActive" | "createdAt" | "updatedAt">,
|
|
1074
|
-
// "asc" | "desc"
|
|
1075
|
-
// >;
|
|
1076
|
-
// export class VehicleFeatureCategoryOptions extends PaginationOptions {
|
|
1077
|
-
// sort?: VehicleFeatureCategorySort;
|
|
1078
|
-
// withFeatures?: boolean;
|
|
1079
|
-
// select?: (VehicleFeatureCategorySelectFields | `features.${VehicleFeatureSelectFields}`)[];
|
|
1080
|
-
// validate(): string[] {
|
|
1081
|
-
// const errors = validateSync(this);
|
|
1082
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1083
|
-
// }
|
|
1084
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleFeatureCategoryOptions {
|
|
1085
|
-
// return plainToClass(VehicleFeatureCategoryOptions, plain);
|
|
1086
|
-
// }
|
|
1087
|
-
// static toPlain(entity: VehicleFeatureCategoryOptions): Record<string, unknown> {
|
|
1088
|
-
// return instanceToPlain(entity);
|
|
1089
|
-
// }
|
|
1090
|
-
// }
|
|
1091
|
-
// -----------------------------------------------------CAR CATEGORY----------------------------------------------------------------
|
|
1092
650
|
class VehicleCategoryFilter extends utilities_1.BaseFilter {
|
|
1093
651
|
validate() {
|
|
1094
652
|
const errors = (0, class_validator_1.validateSync)(this);
|
|
@@ -1163,763 +721,3 @@ class VehicleCategoryOptions extends utilities_1.PaginationOptions {
|
|
|
1163
721
|
}
|
|
1164
722
|
}
|
|
1165
723
|
exports.VehicleCategoryOptions = VehicleCategoryOptions;
|
|
1166
|
-
// -----------------------------------------------------CAR-------------------------------------------------------------------------
|
|
1167
|
-
// export class VehicleFilter extends BaseFilter {
|
|
1168
|
-
// @IsOptional()
|
|
1169
|
-
// @IsString({ each: true })
|
|
1170
|
-
// referenceNumber?: string | string[];
|
|
1171
|
-
// @IsOptional()
|
|
1172
|
-
// @IsString({ each: true })
|
|
1173
|
-
// make?: string | string[]; // id or list of ids or list of names of make
|
|
1174
|
-
// @IsOptional()
|
|
1175
|
-
// @IsString({ each: true })
|
|
1176
|
-
// model?: string | string[]; // id or list of ids or list of names of model
|
|
1177
|
-
// @IsOptional()
|
|
1178
|
-
// @IsString({ each: true })
|
|
1179
|
-
// bodyType?: string | string[]; // id or list of ids or list of names of body type
|
|
1180
|
-
// @IsOptional()
|
|
1181
|
-
// @IsString({ each: true })
|
|
1182
|
-
// vin?: string | string[];
|
|
1183
|
-
// @IsOptional()
|
|
1184
|
-
// @IsString({ each: true })
|
|
1185
|
-
// chassisNumber?: string | string[];
|
|
1186
|
-
// @IsOptional()
|
|
1187
|
-
// @ValidateNested()
|
|
1188
|
-
// @Type(() => NumberRange)
|
|
1189
|
-
// mileage?: NumberRange;
|
|
1190
|
-
// @IsOptional()
|
|
1191
|
-
// @IsString({ each: true })
|
|
1192
|
-
// fuelType?: string | string[];
|
|
1193
|
-
// @IsOptional()
|
|
1194
|
-
// @IsString({ each: true })
|
|
1195
|
-
// color?: string | string[];
|
|
1196
|
-
// @IsOptional()
|
|
1197
|
-
// @IsString({ each: true })
|
|
1198
|
-
// engineCapacity?: string | string[];
|
|
1199
|
-
// @IsOptional()
|
|
1200
|
-
// @ValidateNested()
|
|
1201
|
-
// @Type(() => NumberRange)
|
|
1202
|
-
// numberOfCylinders?: NumberRange;
|
|
1203
|
-
// @IsOptional()
|
|
1204
|
-
// @ValidateNested()
|
|
1205
|
-
// @Type(() => NumberRange)
|
|
1206
|
-
// cylinderCapacity?: NumberRange;
|
|
1207
|
-
// @IsOptional()
|
|
1208
|
-
// @ValidateNested()
|
|
1209
|
-
// @Type(() => NumberRange)
|
|
1210
|
-
// doors?: NumberRange;
|
|
1211
|
-
// @IsOptional()
|
|
1212
|
-
// @ValidateNested()
|
|
1213
|
-
// @Type(() => NumberRange)
|
|
1214
|
-
// seats?: NumberRange;
|
|
1215
|
-
// @IsOptional()
|
|
1216
|
-
// @ValidateNested()
|
|
1217
|
-
// @Type(() => NumberRange)
|
|
1218
|
-
// keys?: NumberRange;
|
|
1219
|
-
// @IsOptional()
|
|
1220
|
-
// @IsString({ each: true })
|
|
1221
|
-
// wheelsType?: string | string[];
|
|
1222
|
-
// @IsOptional()
|
|
1223
|
-
// @ValidateNested()
|
|
1224
|
-
// @Type(() => NumberRange)
|
|
1225
|
-
// airbags?: NumberRange;
|
|
1226
|
-
// @IsOptional()
|
|
1227
|
-
// @IsString({ each: true })
|
|
1228
|
-
// transmission?: string | string[];
|
|
1229
|
-
// @IsOptional()
|
|
1230
|
-
// @IsString({ each: true })
|
|
1231
|
-
// driveType?: string | string[];
|
|
1232
|
-
// @IsOptional()
|
|
1233
|
-
// @IsString({ each: true })
|
|
1234
|
-
// emissions?: string | string[];
|
|
1235
|
-
// @IsOptional()
|
|
1236
|
-
// @ValidateNested()
|
|
1237
|
-
// @Type(() => NumberRange)
|
|
1238
|
-
// year?: NumberRange;
|
|
1239
|
-
// @IsOptional()
|
|
1240
|
-
// @ValidateNested()
|
|
1241
|
-
// @Type(() => NumberRange)
|
|
1242
|
-
// price?: NumberRange;
|
|
1243
|
-
// @IsOptional()
|
|
1244
|
-
// @IsString({ each: true })
|
|
1245
|
-
// status?: string | string[];
|
|
1246
|
-
// @IsOptional()
|
|
1247
|
-
// @IsString({ each: true })
|
|
1248
|
-
// features?: string | string[]; // id or list of ids or list of names or name of feature or feature category
|
|
1249
|
-
// @IsOptional()
|
|
1250
|
-
// @IsString()
|
|
1251
|
-
// search?: string; // A search string
|
|
1252
|
-
// validate(): string[] {
|
|
1253
|
-
// const errors = validateSync(this);
|
|
1254
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1255
|
-
// }
|
|
1256
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleFilter {
|
|
1257
|
-
// return plainToClass(VehicleFilter, plain);
|
|
1258
|
-
// }
|
|
1259
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1260
|
-
// return instanceToPlain(entity);
|
|
1261
|
-
// }
|
|
1262
|
-
// }
|
|
1263
|
-
// export class VehicleUniqueFilter {
|
|
1264
|
-
// @IsOptional()
|
|
1265
|
-
// @IsString()
|
|
1266
|
-
// id?: string;
|
|
1267
|
-
// @IsOptional()
|
|
1268
|
-
// @IsString()
|
|
1269
|
-
// referenceNumber?: string;
|
|
1270
|
-
// @IsOptional()
|
|
1271
|
-
// @IsString()
|
|
1272
|
-
// vin?: string;
|
|
1273
|
-
// @IsOptional()
|
|
1274
|
-
// @IsString()
|
|
1275
|
-
// chassisNumber?: string;
|
|
1276
|
-
// validate(): string[] {
|
|
1277
|
-
// const errors = validateSync(this);
|
|
1278
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1279
|
-
// }
|
|
1280
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleUniqueFilter {
|
|
1281
|
-
// return plainToClass(VehicleUniqueFilter, plain);
|
|
1282
|
-
// }
|
|
1283
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1284
|
-
// return instanceToPlain(entity);
|
|
1285
|
-
// }
|
|
1286
|
-
// }
|
|
1287
|
-
// export type VehicleSort = Record<
|
|
1288
|
-
// keyof Pick<
|
|
1289
|
-
// Vehicle,
|
|
1290
|
-
// | "referenceNumber"
|
|
1291
|
-
// | "mileage"
|
|
1292
|
-
// | "year"
|
|
1293
|
-
// | "createdAt"
|
|
1294
|
-
// | "updatedAt"
|
|
1295
|
-
// | "engineCapacity"
|
|
1296
|
-
// | "doors"
|
|
1297
|
-
// | "seats"
|
|
1298
|
-
// | "keys"
|
|
1299
|
-
// | "transmission"
|
|
1300
|
-
// | "driveType"
|
|
1301
|
-
// | "price"
|
|
1302
|
-
// | "status"
|
|
1303
|
-
// >,
|
|
1304
|
-
// "asc" | "desc"
|
|
1305
|
-
// >;
|
|
1306
|
-
// export class VehicleOptions extends PaginationOptions {
|
|
1307
|
-
// sort?: VehicleSort;
|
|
1308
|
-
// select?: (
|
|
1309
|
-
// | VehicleSelectFields
|
|
1310
|
-
// | `make.${VehicleMakeSelectFields}`
|
|
1311
|
-
// | `model.${VehicleModelSelectFields}`
|
|
1312
|
-
// | `bodyType.${VehicleBodyTypeSelectFields}`
|
|
1313
|
-
// | `features.${VehicleFeatureSelectFields}`
|
|
1314
|
-
// | `metaData.${VehicleMetaDataSelectFields}`
|
|
1315
|
-
// )[];
|
|
1316
|
-
// withMake?: boolean;
|
|
1317
|
-
// withModel?: boolean;
|
|
1318
|
-
// withBodyType?: boolean;
|
|
1319
|
-
// withFeatures?: boolean;
|
|
1320
|
-
// withMetaData?: boolean;
|
|
1321
|
-
// validate(): string[] {
|
|
1322
|
-
// const errors = validateSync(this);
|
|
1323
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1324
|
-
// }
|
|
1325
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleOptions {
|
|
1326
|
-
// return plainToClass(VehicleOptions, plain);
|
|
1327
|
-
// }
|
|
1328
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1329
|
-
// return instanceToPlain(entity);
|
|
1330
|
-
// }
|
|
1331
|
-
// }
|
|
1332
|
-
// export type VehicleMakeSelectFields = keyof VehicleMake;
|
|
1333
|
-
// export type VehicleModelSelectFields = keyof VehicleModel;
|
|
1334
|
-
// export type VehicleSelectFields = keyof Vehicle;
|
|
1335
|
-
// export type VehicleBodyTypeSelectFields = keyof VehicleBodyType;
|
|
1336
|
-
// export type VehicleFeatureSelectFields = keyof VehicleFeature;
|
|
1337
|
-
// export type VehicleCategorySelectFields = keyof VehicleCategory;
|
|
1338
|
-
// export type VehicleFeatureCategorySelectFields = keyof VehicleFeatureCategory;
|
|
1339
|
-
// export type VehicleMetaDataSelectFields = keyof VehicleMetaData;
|
|
1340
|
-
// // -----------------------------------------------------CAR MAKE-------------------------------------------------------------------------
|
|
1341
|
-
// export class VehicleMakeFilter extends BaseFilter {
|
|
1342
|
-
// @IsOptional()
|
|
1343
|
-
// @IsString({ each: true })
|
|
1344
|
-
// id?: string | string[];
|
|
1345
|
-
// @IsOptional()
|
|
1346
|
-
// @IsString({ each: true })
|
|
1347
|
-
// slug?: string | string[];
|
|
1348
|
-
// @IsOptional()
|
|
1349
|
-
// @IsString()
|
|
1350
|
-
// name?: string;
|
|
1351
|
-
// @IsOptional()
|
|
1352
|
-
// @IsString({ each: true })
|
|
1353
|
-
// metaKeywords?: string;
|
|
1354
|
-
// @IsOptional()
|
|
1355
|
-
// @IsString({ each: true })
|
|
1356
|
-
// models?: string | string[]; // A list of model ids and/or names
|
|
1357
|
-
// @IsOptional()
|
|
1358
|
-
// @IsString({ each: true })
|
|
1359
|
-
// vehicles?: string | string[]; // A list of vehicle ids and/or names
|
|
1360
|
-
// @IsOptional()
|
|
1361
|
-
// @IsString()
|
|
1362
|
-
// search?: string; // A search string
|
|
1363
|
-
// validate(): string[] {
|
|
1364
|
-
// const errors = validateSync(this);
|
|
1365
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1366
|
-
// }
|
|
1367
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleMakeFilter {
|
|
1368
|
-
// return plainToClass(VehicleMakeFilter, plain);
|
|
1369
|
-
// }
|
|
1370
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1371
|
-
// return instanceToPlain(entity);
|
|
1372
|
-
// }
|
|
1373
|
-
// }
|
|
1374
|
-
// // This filter is used to get a unique vehicle make by unique fields
|
|
1375
|
-
// export class VehicleMakeUniqueFilter extends BaseFilter {
|
|
1376
|
-
// @IsOptional()
|
|
1377
|
-
// @IsString()
|
|
1378
|
-
// id?: string;
|
|
1379
|
-
// @IsOptional()
|
|
1380
|
-
// @IsString()
|
|
1381
|
-
// slug?: string;
|
|
1382
|
-
// @IsOptional()
|
|
1383
|
-
// @IsString()
|
|
1384
|
-
// name?: string;
|
|
1385
|
-
// validate(): string[] {
|
|
1386
|
-
// const errors = validateSync(this);
|
|
1387
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1388
|
-
// }
|
|
1389
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleMakeFilter {
|
|
1390
|
-
// return plainToClass(VehicleMakeFilter, plain);
|
|
1391
|
-
// }
|
|
1392
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1393
|
-
// return instanceToPlain(entity);
|
|
1394
|
-
// }
|
|
1395
|
-
// }
|
|
1396
|
-
// export type VehicleMakeSort = Record<
|
|
1397
|
-
// keyof Pick<VehicleMake, "name" | "isActive" | "createdAt" | "updatedAt">,
|
|
1398
|
-
// "asc" | "desc"
|
|
1399
|
-
// >;
|
|
1400
|
-
// export class VehicleMakeOptions extends PaginationOptions {
|
|
1401
|
-
// sort?: VehicleMakeSort;
|
|
1402
|
-
// withModels?: boolean;
|
|
1403
|
-
// withVehicles?: boolean;
|
|
1404
|
-
// select?: (VehicleMakeSelectFields | `models.${VehicleModelSelectFields}` | `vehicles.${VehicleSelectFields}`)[];
|
|
1405
|
-
// validate(): string[] {
|
|
1406
|
-
// const errors = validateSync(this);
|
|
1407
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1408
|
-
// }
|
|
1409
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleMakeOptions {
|
|
1410
|
-
// return plainToClass(VehicleMakeOptions, plain);
|
|
1411
|
-
// }
|
|
1412
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1413
|
-
// return instanceToPlain(entity);
|
|
1414
|
-
// }
|
|
1415
|
-
// }
|
|
1416
|
-
// // -----------------------------------------------------CAR MODEL-------------------------------------------------------------------------
|
|
1417
|
-
// export class VehicleModelFilter extends BaseFilter {
|
|
1418
|
-
// @IsOptional()
|
|
1419
|
-
// @IsString({ each: true })
|
|
1420
|
-
// id?: string | string[];
|
|
1421
|
-
// @IsOptional()
|
|
1422
|
-
// @IsString({ each: true })
|
|
1423
|
-
// slug?: string | string[];
|
|
1424
|
-
// @IsOptional()
|
|
1425
|
-
// @IsString()
|
|
1426
|
-
// name?: string;
|
|
1427
|
-
// @IsOptional()
|
|
1428
|
-
// @IsString({ each: true })
|
|
1429
|
-
// metaKeywords?: string;
|
|
1430
|
-
// @IsOptional()
|
|
1431
|
-
// @IsString({ each: true })
|
|
1432
|
-
// makes?: string | string[]; // A list of make ids and/or names
|
|
1433
|
-
// @IsOptional()
|
|
1434
|
-
// @IsString({ each: true })
|
|
1435
|
-
// vehicles?: string | string[]; // A list of vehicle ids and/or names
|
|
1436
|
-
// search?: string; // A search string
|
|
1437
|
-
// validate(): string[] {
|
|
1438
|
-
// const errors = validateSync(this);
|
|
1439
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1440
|
-
// }
|
|
1441
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleModelFilter {
|
|
1442
|
-
// return plainToClass(VehicleModelFilter, plain);
|
|
1443
|
-
// }
|
|
1444
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1445
|
-
// return instanceToPlain(entity);
|
|
1446
|
-
// }
|
|
1447
|
-
// }
|
|
1448
|
-
// export class VehicleModelUniqueFilter extends BaseFilter {
|
|
1449
|
-
// @IsOptional()
|
|
1450
|
-
// @IsString()
|
|
1451
|
-
// id?: string;
|
|
1452
|
-
// @IsOptional()
|
|
1453
|
-
// @IsString()
|
|
1454
|
-
// slug?: string;
|
|
1455
|
-
// @IsOptional()
|
|
1456
|
-
// @IsString()
|
|
1457
|
-
// name?: string;
|
|
1458
|
-
// validate(): string[] {
|
|
1459
|
-
// const errors = validateSync(this);
|
|
1460
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1461
|
-
// }
|
|
1462
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleModelUniqueFilter {
|
|
1463
|
-
// return plainToClass(VehicleModelUniqueFilter, plain);
|
|
1464
|
-
// }
|
|
1465
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1466
|
-
// return instanceToPlain(entity);
|
|
1467
|
-
// }
|
|
1468
|
-
// }
|
|
1469
|
-
// export type VehicleModelSort = Record<
|
|
1470
|
-
// keyof Pick<VehicleModel, "name" | "isActive" | "createdAt" | "updatedAt">,
|
|
1471
|
-
// "asc" | "desc"
|
|
1472
|
-
// >;
|
|
1473
|
-
// export class VehicleModelOptions extends PaginationOptions {
|
|
1474
|
-
// sort?: VehicleModelSort;
|
|
1475
|
-
// withVehicles?: boolean;
|
|
1476
|
-
// withMake?: boolean;
|
|
1477
|
-
// select?: (VehicleModelSelectFields | `vehicles.${VehicleSelectFields}` | `make.${VehicleMakeSelectFields}`)[];
|
|
1478
|
-
// validate(): string[] {
|
|
1479
|
-
// const errors = validateSync(this);
|
|
1480
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1481
|
-
// }
|
|
1482
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleModelOptions {
|
|
1483
|
-
// return plainToClass(VehicleModelOptions, plain);
|
|
1484
|
-
// }
|
|
1485
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1486
|
-
// return instanceToPlain(entity);
|
|
1487
|
-
// }
|
|
1488
|
-
// }
|
|
1489
|
-
// // -----------------------------------------------------CAR BODY TYPE----------------------------------------------------------------
|
|
1490
|
-
// export class VehicleBodyTypeFilter extends BaseFilter {
|
|
1491
|
-
// @IsOptional()
|
|
1492
|
-
// @IsString({ each: true })
|
|
1493
|
-
// id?: string | string[];
|
|
1494
|
-
// @IsOptional()
|
|
1495
|
-
// @IsString({ each: true })
|
|
1496
|
-
// slug?: string | string[];
|
|
1497
|
-
// @IsOptional()
|
|
1498
|
-
// @IsString()
|
|
1499
|
-
// name?: string;
|
|
1500
|
-
// @IsOptional()
|
|
1501
|
-
// @IsString({ each: true })
|
|
1502
|
-
// vehicles?: string | string[]; // A list of vehicle ids and/or names
|
|
1503
|
-
// @IsOptional()
|
|
1504
|
-
// @IsString({ each: true })
|
|
1505
|
-
// models?: string | string[]; // A list of model ids and/or names
|
|
1506
|
-
// @IsOptional()
|
|
1507
|
-
// @IsString()
|
|
1508
|
-
// search?: string; // A search string
|
|
1509
|
-
// validate(): string[] {
|
|
1510
|
-
// const errors = validateSync(this);
|
|
1511
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1512
|
-
// }
|
|
1513
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleModelFilter {
|
|
1514
|
-
// return plainToClass(VehicleModelFilter, plain);
|
|
1515
|
-
// }
|
|
1516
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1517
|
-
// return instanceToPlain(entity);
|
|
1518
|
-
// }
|
|
1519
|
-
// }
|
|
1520
|
-
// export class VehicleBodyTypeUniqueFilter {
|
|
1521
|
-
// @IsOptional()
|
|
1522
|
-
// @IsString()
|
|
1523
|
-
// id?: string;
|
|
1524
|
-
// @IsOptional()
|
|
1525
|
-
// @IsString()
|
|
1526
|
-
// slug?: string;
|
|
1527
|
-
// @IsOptional()
|
|
1528
|
-
// @IsString()
|
|
1529
|
-
// name?: string;
|
|
1530
|
-
// validate(): string[] {
|
|
1531
|
-
// const errors = validateSync(this);
|
|
1532
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1533
|
-
// }
|
|
1534
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleModelFilter {
|
|
1535
|
-
// return plainToClass(VehicleModelFilter, plain);
|
|
1536
|
-
// }
|
|
1537
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1538
|
-
// return instanceToPlain(entity);
|
|
1539
|
-
// }
|
|
1540
|
-
// }
|
|
1541
|
-
// export type VehicleBodyTypeSort = Record<
|
|
1542
|
-
// keyof Pick<VehicleBodyType, "name" | "isActive" | "createdAt" | "updatedAt">,
|
|
1543
|
-
// "asc" | "desc"
|
|
1544
|
-
// >;
|
|
1545
|
-
// export class VehicleBodyTypeOptions extends PaginationOptions {
|
|
1546
|
-
// sort?: VehicleBodyTypeSort;
|
|
1547
|
-
// withVehicles?: boolean;
|
|
1548
|
-
// select?: (VehicleBodyTypeSelectFields | `vehicles.${VehicleSelectFields}` | `models.${VehicleModelSelectFields}`)[];
|
|
1549
|
-
// validate(): string[] {
|
|
1550
|
-
// const errors = validateSync(this);
|
|
1551
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1552
|
-
// }
|
|
1553
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleModelOptions {
|
|
1554
|
-
// return plainToClass(VehicleModelOptions, plain);
|
|
1555
|
-
// }
|
|
1556
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1557
|
-
// return instanceToPlain(entity);
|
|
1558
|
-
// }
|
|
1559
|
-
// }
|
|
1560
|
-
// // -----------------------------------------------------CAR FEATURE----------------------------------------------------------------
|
|
1561
|
-
// export class VehicleFeatureFilter extends BaseFilter {
|
|
1562
|
-
// @IsOptional()
|
|
1563
|
-
// @IsString({ each: true })
|
|
1564
|
-
// id?: string | string[];
|
|
1565
|
-
// @IsOptional()
|
|
1566
|
-
// @IsString({ each: true })
|
|
1567
|
-
// slug?: string | string[];
|
|
1568
|
-
// @IsOptional()
|
|
1569
|
-
// @IsString()
|
|
1570
|
-
// name?: string;
|
|
1571
|
-
// @IsOptional()
|
|
1572
|
-
// @IsString({ each: true })
|
|
1573
|
-
// categories?: string | string[]; // A list of vehicle ids and/or names
|
|
1574
|
-
// @IsOptional()
|
|
1575
|
-
// @IsString()
|
|
1576
|
-
// search?: string; // A search string
|
|
1577
|
-
// validate(): string[] {
|
|
1578
|
-
// const errors = validateSync(this);
|
|
1579
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1580
|
-
// }
|
|
1581
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleModelFilter {
|
|
1582
|
-
// return plainToClass(VehicleModelFilter, plain);
|
|
1583
|
-
// }
|
|
1584
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1585
|
-
// return instanceToPlain(entity);
|
|
1586
|
-
// }
|
|
1587
|
-
// }
|
|
1588
|
-
// export class VehicleFeatureUniqueFilter {
|
|
1589
|
-
// @IsOptional()
|
|
1590
|
-
// @IsString()
|
|
1591
|
-
// id?: string;
|
|
1592
|
-
// @IsOptional()
|
|
1593
|
-
// @IsString()
|
|
1594
|
-
// slug?: string;
|
|
1595
|
-
// @IsOptional()
|
|
1596
|
-
// @IsString()
|
|
1597
|
-
// name?: string;
|
|
1598
|
-
// validate(): string[] {
|
|
1599
|
-
// const errors = validateSync(this);
|
|
1600
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1601
|
-
// }
|
|
1602
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleModelFilter {
|
|
1603
|
-
// return plainToClass(VehicleModelFilter, plain);
|
|
1604
|
-
// }
|
|
1605
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1606
|
-
// return instanceToPlain(entity);
|
|
1607
|
-
// }
|
|
1608
|
-
// }
|
|
1609
|
-
// export type VehicleFeatureSort = Record<
|
|
1610
|
-
// keyof Pick<VehicleFeature, "name" | "isActive" | "createdAt" | "updatedAt">,
|
|
1611
|
-
// "asc" | "desc"
|
|
1612
|
-
// >;
|
|
1613
|
-
// export class VehicleFeatureOptions extends PaginationOptions {
|
|
1614
|
-
// sort?: VehicleFeatureSort;
|
|
1615
|
-
// withCategories?: boolean;
|
|
1616
|
-
// select?: (VehicleFeatureSelectFields | `categories.${VehicleCategorySelectFields}`)[];
|
|
1617
|
-
// validate(): string[] {
|
|
1618
|
-
// const errors = validateSync(this);
|
|
1619
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1620
|
-
// }
|
|
1621
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleFeatureOptions {
|
|
1622
|
-
// return plainToClass(VehicleFeatureOptions, plain);
|
|
1623
|
-
// }
|
|
1624
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1625
|
-
// return instanceToPlain(entity);
|
|
1626
|
-
// }
|
|
1627
|
-
// }
|
|
1628
|
-
// // -----------------------------------------------------CAR FEATURE CATEGORY----------------------------------------------------------------
|
|
1629
|
-
// export class VehicleFeatureCategoryFilter extends BaseFilter {
|
|
1630
|
-
// @IsOptional()
|
|
1631
|
-
// @IsString({ each: true })
|
|
1632
|
-
// id?: string | string[];
|
|
1633
|
-
// @IsOptional()
|
|
1634
|
-
// @IsString({ each: true })
|
|
1635
|
-
// slug?: string | string[];
|
|
1636
|
-
// @IsOptional()
|
|
1637
|
-
// @IsString()
|
|
1638
|
-
// name?: string;
|
|
1639
|
-
// @IsOptional()
|
|
1640
|
-
// @IsString({ each: true })
|
|
1641
|
-
// features?: string | string[]; // A list of vehicle ids and/or names
|
|
1642
|
-
// @IsOptional()
|
|
1643
|
-
// @IsString()
|
|
1644
|
-
// search?: string; // A search string
|
|
1645
|
-
// validate(): string[] {
|
|
1646
|
-
// const errors = validateSync(this);
|
|
1647
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1648
|
-
// }
|
|
1649
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleFeatureCategoryFilter {
|
|
1650
|
-
// return plainToClass(VehicleFeatureCategoryFilter, plain);
|
|
1651
|
-
// }
|
|
1652
|
-
// static toPlain(entity: VehicleFeatureCategoryFilter): Record<string, unknown> {
|
|
1653
|
-
// return instanceToPlain(entity);
|
|
1654
|
-
// }
|
|
1655
|
-
// }
|
|
1656
|
-
// export class VehicleFeatureCategoryUniqueFilter {
|
|
1657
|
-
// @IsOptional()
|
|
1658
|
-
// @IsString()
|
|
1659
|
-
// id?: string;
|
|
1660
|
-
// @IsOptional()
|
|
1661
|
-
// @IsString()
|
|
1662
|
-
// slug?: string;
|
|
1663
|
-
// @IsOptional()
|
|
1664
|
-
// @IsString()
|
|
1665
|
-
// name?: string;
|
|
1666
|
-
// validate(): string[] {
|
|
1667
|
-
// const errors = validateSync(this);
|
|
1668
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1669
|
-
// }
|
|
1670
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleFeatureCategoryUniqueFilter {
|
|
1671
|
-
// return plainToClass(VehicleFeatureCategoryUniqueFilter, plain);
|
|
1672
|
-
// }
|
|
1673
|
-
// static toPlain(entity: VehicleFeatureCategoryUniqueFilter): Record<string, unknown> {
|
|
1674
|
-
// return instanceToPlain(entity);
|
|
1675
|
-
// }
|
|
1676
|
-
// }
|
|
1677
|
-
// export type VehicleFeatureCategorySort = Record<
|
|
1678
|
-
// keyof Pick<VehicleFeatureCategory, "name" | "isActive" | "createdAt" | "updatedAt">,
|
|
1679
|
-
// "asc" | "desc"
|
|
1680
|
-
// >;
|
|
1681
|
-
// export class VehicleFeatureCategoryOptions extends PaginationOptions {
|
|
1682
|
-
// sort?: VehicleFeatureCategorySort;
|
|
1683
|
-
// withFeatures?: boolean;
|
|
1684
|
-
// select?: (VehicleFeatureCategorySelectFields | `features.${VehicleFeatureSelectFields}`)[];
|
|
1685
|
-
// validate(): string[] {
|
|
1686
|
-
// const errors = validateSync(this);
|
|
1687
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1688
|
-
// }
|
|
1689
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleFeatureCategoryOptions {
|
|
1690
|
-
// return plainToClass(VehicleFeatureCategoryOptions, plain);
|
|
1691
|
-
// }
|
|
1692
|
-
// static toPlain(entity: VehicleFeatureCategoryOptions): Record<string, unknown> {
|
|
1693
|
-
// return instanceToPlain(entity);
|
|
1694
|
-
// }
|
|
1695
|
-
// }
|
|
1696
|
-
// // -----------------------------------------------------CAR CATEGORY----------------------------------------------------------------
|
|
1697
|
-
// export class VehicleCategoryFilter extends BaseFilter {
|
|
1698
|
-
// @IsOptional()
|
|
1699
|
-
// @IsString({ each: true })
|
|
1700
|
-
// id?: string | string[];
|
|
1701
|
-
// @IsOptional()
|
|
1702
|
-
// @IsString({ each: true })
|
|
1703
|
-
// slug?: string | string[];
|
|
1704
|
-
// @IsOptional()
|
|
1705
|
-
// @IsString()
|
|
1706
|
-
// name?: string;
|
|
1707
|
-
// @IsOptional()
|
|
1708
|
-
// @IsString()
|
|
1709
|
-
// search?: string; // A search string
|
|
1710
|
-
// validate(): string[] {
|
|
1711
|
-
// const errors = validateSync(this);
|
|
1712
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1713
|
-
// }
|
|
1714
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleCategoryFilter {
|
|
1715
|
-
// return plainToClass(VehicleCategoryFilter, plain);
|
|
1716
|
-
// }
|
|
1717
|
-
// static toPlain(entity: VehicleCategoryFilter): Record<string, unknown> {
|
|
1718
|
-
// return instanceToPlain(entity);
|
|
1719
|
-
// }
|
|
1720
|
-
// }
|
|
1721
|
-
// export class VehicleCategoryUniqueFilter {
|
|
1722
|
-
// @IsOptional()
|
|
1723
|
-
// @IsString()
|
|
1724
|
-
// id?: string;
|
|
1725
|
-
// @IsOptional()
|
|
1726
|
-
// @IsString()
|
|
1727
|
-
// slug?: string;
|
|
1728
|
-
// @IsOptional()
|
|
1729
|
-
// @IsString()
|
|
1730
|
-
// name?: string;
|
|
1731
|
-
// validate(): string[] {
|
|
1732
|
-
// const errors = validateSync(this);
|
|
1733
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1734
|
-
// }
|
|
1735
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleCategoryUniqueFilter {
|
|
1736
|
-
// return plainToClass(VehicleCategoryUniqueFilter, plain);
|
|
1737
|
-
// }
|
|
1738
|
-
// static toPlain(entity: VehicleCategoryUniqueFilter): Record<string, unknown> {
|
|
1739
|
-
// return instanceToPlain(entity);
|
|
1740
|
-
// }
|
|
1741
|
-
// }
|
|
1742
|
-
// export type VehicleCategorySort = Record<
|
|
1743
|
-
// keyof Pick<VehicleCategory, "name" | "isActive" | "createdAt" | "updatedAt">,
|
|
1744
|
-
// "asc" | "desc"
|
|
1745
|
-
// >;
|
|
1746
|
-
// export class VehicleCategoryOptions extends PaginationOptions {
|
|
1747
|
-
// sort?: VehicleCategorySort;
|
|
1748
|
-
// select?: (VehicleCategorySelectFields | `features.${VehicleFeatureSelectFields}`)[];
|
|
1749
|
-
// validate(): string[] {
|
|
1750
|
-
// const errors = validateSync(this);
|
|
1751
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1752
|
-
// }
|
|
1753
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleFeatureOptions {
|
|
1754
|
-
// return plainToClass(VehicleFeatureOptions, plain);
|
|
1755
|
-
// }
|
|
1756
|
-
// static toPlain(entity: VehicleCategoryOptions): Record<string, unknown> {
|
|
1757
|
-
// return instanceToPlain(entity);
|
|
1758
|
-
// }
|
|
1759
|
-
// }
|
|
1760
|
-
// // -----------------------------------------------------CAR-------------------------------------------------------------------------
|
|
1761
|
-
// export class VehicleFilter extends BaseFilter {
|
|
1762
|
-
// @IsOptional()
|
|
1763
|
-
// @IsString({ each: true })
|
|
1764
|
-
// referenceNumber?: string | string[];
|
|
1765
|
-
// @IsOptional()
|
|
1766
|
-
// @IsString({ each: true })
|
|
1767
|
-
// make?: string | string[]; // id or list of ids or list of names of make
|
|
1768
|
-
// @IsOptional()
|
|
1769
|
-
// @IsString({ each: true })
|
|
1770
|
-
// model?: string | string[]; // id or list of ids or list of names of model
|
|
1771
|
-
// @IsOptional()
|
|
1772
|
-
// @IsString({ each: true })
|
|
1773
|
-
// bodyType?: string | string[]; // id or list of ids or list of names of body type
|
|
1774
|
-
// @IsOptional()
|
|
1775
|
-
// @IsString({ each: true })
|
|
1776
|
-
// vin?: string | string[];
|
|
1777
|
-
// @IsOptional()
|
|
1778
|
-
// @IsString({ each: true })
|
|
1779
|
-
// chassisNumber?: string | string[];
|
|
1780
|
-
// @IsOptional()
|
|
1781
|
-
// @ValidateNested()
|
|
1782
|
-
// @Type(() => NumberRange)
|
|
1783
|
-
// mileage?: NumberRange;
|
|
1784
|
-
// @IsOptional()
|
|
1785
|
-
// @IsString({ each: true })
|
|
1786
|
-
// fuelType?: string | string[];
|
|
1787
|
-
// @IsOptional()
|
|
1788
|
-
// @IsString({ each: true })
|
|
1789
|
-
// color?: string | string[];
|
|
1790
|
-
// @IsOptional()
|
|
1791
|
-
// @IsString({ each: true })
|
|
1792
|
-
// engineCapacity?: string | string[];
|
|
1793
|
-
// @IsOptional()
|
|
1794
|
-
// @ValidateNested()
|
|
1795
|
-
// @Type(() => NumberRange)
|
|
1796
|
-
// numberOfCylinders?: NumberRange;
|
|
1797
|
-
// @IsOptional()
|
|
1798
|
-
// @ValidateNested()
|
|
1799
|
-
// @Type(() => NumberRange)
|
|
1800
|
-
// cylinderCapacity?: NumberRange;
|
|
1801
|
-
// @IsOptional()
|
|
1802
|
-
// @ValidateNested()
|
|
1803
|
-
// @Type(() => NumberRange)
|
|
1804
|
-
// doors?: NumberRange;
|
|
1805
|
-
// @IsOptional()
|
|
1806
|
-
// @ValidateNested()
|
|
1807
|
-
// @Type(() => NumberRange)
|
|
1808
|
-
// seats?: NumberRange;
|
|
1809
|
-
// @IsOptional()
|
|
1810
|
-
// @ValidateNested()
|
|
1811
|
-
// @Type(() => NumberRange)
|
|
1812
|
-
// keys?: NumberRange;
|
|
1813
|
-
// @IsOptional()
|
|
1814
|
-
// @IsString({ each: true })
|
|
1815
|
-
// wheelsType?: string | string[];
|
|
1816
|
-
// @IsOptional()
|
|
1817
|
-
// @ValidateNested()
|
|
1818
|
-
// @Type(() => NumberRange)
|
|
1819
|
-
// airbags?: NumberRange;
|
|
1820
|
-
// @IsOptional()
|
|
1821
|
-
// @IsString({ each: true })
|
|
1822
|
-
// transmission?: string | string[];
|
|
1823
|
-
// @IsOptional()
|
|
1824
|
-
// @IsString({ each: true })
|
|
1825
|
-
// driveType?: string | string[];
|
|
1826
|
-
// @IsOptional()
|
|
1827
|
-
// @IsString({ each: true })
|
|
1828
|
-
// emissions?: string | string[];
|
|
1829
|
-
// @IsOptional()
|
|
1830
|
-
// @ValidateNested()
|
|
1831
|
-
// @Type(() => NumberRange)
|
|
1832
|
-
// year?: NumberRange;
|
|
1833
|
-
// @IsOptional()
|
|
1834
|
-
// @ValidateNested()
|
|
1835
|
-
// @Type(() => NumberRange)
|
|
1836
|
-
// price?: NumberRange;
|
|
1837
|
-
// @IsOptional()
|
|
1838
|
-
// @IsString({ each: true })
|
|
1839
|
-
// status?: string | string[];
|
|
1840
|
-
// @IsOptional()
|
|
1841
|
-
// @IsString({ each: true })
|
|
1842
|
-
// features?: string | string[]; // id or list of ids or list of names or name of feature or feature category
|
|
1843
|
-
// @IsOptional()
|
|
1844
|
-
// @IsString()
|
|
1845
|
-
// search?: string; // A search string
|
|
1846
|
-
// validate(): string[] {
|
|
1847
|
-
// const errors = validateSync(this);
|
|
1848
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1849
|
-
// }
|
|
1850
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleFilter {
|
|
1851
|
-
// return plainToClass(VehicleFilter, plain);
|
|
1852
|
-
// }
|
|
1853
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1854
|
-
// return instanceToPlain(entity);
|
|
1855
|
-
// }
|
|
1856
|
-
// }
|
|
1857
|
-
// export class VehicleUniqueFilter {
|
|
1858
|
-
// @IsOptional()
|
|
1859
|
-
// @IsString()
|
|
1860
|
-
// id?: string;
|
|
1861
|
-
// @IsOptional()
|
|
1862
|
-
// @IsString()
|
|
1863
|
-
// referenceNumber?: string;
|
|
1864
|
-
// @IsOptional()
|
|
1865
|
-
// @IsString()
|
|
1866
|
-
// vin?: string;
|
|
1867
|
-
// @IsOptional()
|
|
1868
|
-
// @IsString()
|
|
1869
|
-
// chassisNumber?: string;
|
|
1870
|
-
// validate(): string[] {
|
|
1871
|
-
// const errors = validateSync(this);
|
|
1872
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1873
|
-
// }
|
|
1874
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleUniqueFilter {
|
|
1875
|
-
// return plainToClass(VehicleUniqueFilter, plain);
|
|
1876
|
-
// }
|
|
1877
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1878
|
-
// return instanceToPlain(entity);
|
|
1879
|
-
// }
|
|
1880
|
-
// }
|
|
1881
|
-
// export type VehicleSort = Record<
|
|
1882
|
-
// keyof Pick<
|
|
1883
|
-
// Vehicle,
|
|
1884
|
-
// | "referenceNumber"
|
|
1885
|
-
// | "mileage"
|
|
1886
|
-
// | "year"
|
|
1887
|
-
// | "createdAt"
|
|
1888
|
-
// | "updatedAt"
|
|
1889
|
-
// | "engineCapacity"
|
|
1890
|
-
// | "doors"
|
|
1891
|
-
// | "seats"
|
|
1892
|
-
// | "keys"
|
|
1893
|
-
// | "transmission"
|
|
1894
|
-
// | "driveType"
|
|
1895
|
-
// | "price"
|
|
1896
|
-
// | "status"
|
|
1897
|
-
// >,
|
|
1898
|
-
// "asc" | "desc"
|
|
1899
|
-
// >;
|
|
1900
|
-
// export class VehicleOptions extends PaginationOptions {
|
|
1901
|
-
// sort?: VehicleSort;
|
|
1902
|
-
// select?: (
|
|
1903
|
-
// | VehicleSelectFields
|
|
1904
|
-
// | `make.${VehicleMakeSelectFields}`
|
|
1905
|
-
// | `model.${VehicleModelSelectFields}`
|
|
1906
|
-
// | `bodyType.${VehicleBodyTypeSelectFields}`
|
|
1907
|
-
// | `features.${VehicleFeatureSelectFields}`
|
|
1908
|
-
// | `metaData.${VehicleMetaDataSelectFields}`
|
|
1909
|
-
// )[];
|
|
1910
|
-
// withMake?: boolean;
|
|
1911
|
-
// withModel?: boolean;
|
|
1912
|
-
// withBodyType?: boolean;
|
|
1913
|
-
// withFeatures?: boolean;
|
|
1914
|
-
// withMetaData?: boolean;
|
|
1915
|
-
// validate(): string[] {
|
|
1916
|
-
// const errors = validateSync(this);
|
|
1917
|
-
// return errors.map((error) => Object.values(error.constraints ?? {})).flat();
|
|
1918
|
-
// }
|
|
1919
|
-
// static fromPlain(plain: Record<string, unknown>): VehicleOptions {
|
|
1920
|
-
// return plainToClass(VehicleOptions, plain);
|
|
1921
|
-
// }
|
|
1922
|
-
// static toPlain(entity: any): Record<string, unknown> {
|
|
1923
|
-
// return instanceToPlain(entity);
|
|
1924
|
-
// }
|
|
1925
|
-
// }
|