@alba-cars/common-modules 1.2.7 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/error-handling/errorHandler.d.ts +1 -1
- package/dist/core/error-handling/errorHandler.js +36 -10
- package/dist/core/models/index.d.ts +1 -0
- package/dist/core/models/index.js +1 -0
- package/dist/core/models/media/index.d.ts +1 -0
- package/dist/core/models/media/index.js +17 -0
- package/dist/core/models/media/media_data.d.ts +4 -0
- package/dist/core/models/media/media_data.js +2 -0
- package/dist/core/network/endpoint-config.d.ts +8 -1
- package/dist/core/network/endpoint-config.js +55 -6
- package/dist/core/network/fetch-api.js +24 -20
- package/dist/core/utils/global_validators.d.ts +2 -0
- package/dist/core/utils/global_validators.js +20 -0
- package/dist/core/utils/index.d.ts +1 -0
- package/dist/core/utils/index.js +1 -0
- package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.d.ts +92 -0
- package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.js +286 -0
- package/dist/features/finance-eligibilty-request/data/index.d.ts +1 -0
- package/dist/features/finance-eligibilty-request/data/index.js +17 -0
- package/dist/features/finance-eligibilty-request/index.d.ts +1 -0
- package/dist/features/finance-eligibilty-request/index.js +17 -0
- package/dist/features/index.d.ts +7 -5
- package/dist/features/index.js +2 -0
- package/dist/features/sell-call-request/data/dto/SellCarRequestDTO.d.ts +134 -0
- package/dist/features/sell-call-request/data/dto/SellCarRequestDTO.js +394 -0
- package/dist/features/sell-call-request/data/index.d.ts +1 -0
- package/dist/features/sell-call-request/data/index.js +17 -0
- package/dist/features/sell-call-request/index.d.ts +1 -0
- package/dist/features/sell-call-request/index.js +17 -0
- package/dist/features/showroom-visit/data/dto/ShowroomVisit.d.ts +27 -2
- package/dist/features/showroom-visit/data/dto/ShowroomVisit.js +86 -5
- package/dist/features/test-drive-request/data/dto/TestDriveRequestDTO.d.ts +9 -6
- package/dist/features/test-drive-request/data/dto/TestDriveRequestDTO.js +16 -3
- package/dist/features/vehicle/data/dto/MediaDTO.d.ts +5 -0
- package/dist/features/vehicle/data/dto/MediaDTO.js +2 -0
- package/dist/features/vehicle/data/dto/VehicleCategoryDTO.d.ts +39 -0
- package/dist/features/vehicle/data/dto/VehicleCategoryDTO.js +114 -0
- package/dist/features/vehicle/data/dto/VehicleDTO.d.ts +16 -8
- package/dist/features/vehicle/data/dto/VehicleDTO.js +43 -6
- package/dist/features/vehicle/data/dto/VehicleFilterDTO.d.ts +230 -0
- package/dist/features/vehicle/data/dto/VehicleFilterDTO.js +705 -0
- package/dist/features/vehicle/data/dto/VehicleFinanceDTO.d.ts +23 -12
- package/dist/features/vehicle/data/dto/VehicleFinanceDTO.js +41 -1
- package/dist/features/vehicle/data/dto/VehicleInspectionDTO.d.ts +147 -0
- package/dist/features/vehicle/data/dto/VehicleInspectionDTO.js +765 -0
- package/dist/features/vehicle/data/dto/VehicleMedia.d.ts +14 -0
- package/dist/features/vehicle/data/dto/VehicleMedia.js +29 -4
- package/dist/features/vehicle/data/dto/VehicleModelDTO.d.ts +5 -5
- package/dist/features/vehicle/data/dto/VehicleModelDTO.js +7 -7
- package/dist/features/vehicle/data/dto/VehicleTypeDTO.d.ts +1 -1
- package/dist/features/vehicle/data/dto/VehicleTypeDTO.js +1 -1
- package/dist/features/vehicle/data/dto/index.d.ts +5 -0
- package/dist/features/vehicle/data/dto/index.js +5 -0
- package/dist/features/vehicle/data/index.d.ts +0 -1
- package/dist/features/vehicle/data/index.js +1 -1
- package/dist/features/vehicle/data/models/VehicleFeature.d.ts +1 -0
- package/dist/features/vehicle/data/models/VehicleFeatureCategory.d.ts +1 -0
- package/dist/features/vehicle/data/models/VehicleFinance.d.ts +3 -0
- package/dist/features/vehicle/data/utilities.d.ts +32 -6
- package/dist/features/vehicle/data/utilities.js +1222 -19
- package/dist/global/utilities.d.ts +4 -0
- package/dist/global/utilities.js +3 -1
- package/package.json +2 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { VehicleMediaType } from "../enums";
|
|
2
|
+
import { FileInput } from "../../../../core";
|
|
2
3
|
export declare class VehicleMediaCreateDTO {
|
|
3
4
|
mediaType: VehicleMediaType;
|
|
4
5
|
mediaUrl: string;
|
|
6
|
+
placeholder: string;
|
|
5
7
|
thumbnailUrl?: string;
|
|
6
8
|
isPrimary: boolean;
|
|
7
9
|
validate(): string[];
|
|
@@ -18,6 +20,18 @@ export declare class VehicleMediaFilterDTO {
|
|
|
18
20
|
validate(): string[];
|
|
19
21
|
static fromPlain(plain: Record<string, unknown>): VehicleMediaFilterDTO;
|
|
20
22
|
}
|
|
23
|
+
export declare class VehicleMediaCreateS3UrlDTO {
|
|
24
|
+
files: FileInput[];
|
|
25
|
+
vehicle?: string;
|
|
26
|
+
folder?: string;
|
|
27
|
+
expiresIn?: number;
|
|
28
|
+
constructor();
|
|
29
|
+
}
|
|
30
|
+
export declare class S3MediaCreateURLDTO {
|
|
31
|
+
vehicleId?: string;
|
|
32
|
+
folder?: string;
|
|
33
|
+
files: FileInput[];
|
|
34
|
+
}
|
|
21
35
|
export declare class VehicleMediaUpdateDTO {
|
|
22
36
|
data: VehicleMediaCreateDTO[];
|
|
23
37
|
replace: boolean;
|
|
@@ -9,14 +9,14 @@ 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.VehicleMediaUpdateDTO = exports.VehicleMediaFilterDTO = exports.VehicleMediaCreateDTO = void 0;
|
|
12
|
+
exports.VehicleMediaUpdateDTO = exports.S3MediaCreateURLDTO = exports.VehicleMediaCreateS3UrlDTO = exports.VehicleMediaFilterDTO = exports.VehicleMediaCreateDTO = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const enums_1 = require("../enums");
|
|
15
15
|
const class_transformer_1 = require("class-transformer");
|
|
16
16
|
class VehicleMediaCreateDTO {
|
|
17
17
|
validate() {
|
|
18
18
|
const errors = (0, class_validator_1.validateSync)(this);
|
|
19
|
-
return errors.map(error => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
19
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
20
20
|
}
|
|
21
21
|
static fromPlain(plain) {
|
|
22
22
|
return (0, class_transformer_1.plainToClass)(VehicleMediaCreateDTO, plain);
|
|
@@ -34,6 +34,11 @@ __decorate([
|
|
|
34
34
|
(0, class_validator_1.IsString)(),
|
|
35
35
|
__metadata("design:type", String)
|
|
36
36
|
], VehicleMediaCreateDTO.prototype, "mediaUrl", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], VehicleMediaCreateDTO.prototype, "placeholder", void 0);
|
|
37
42
|
__decorate([
|
|
38
43
|
(0, class_validator_1.IsOptional)(),
|
|
39
44
|
(0, class_validator_1.IsString)(),
|
|
@@ -48,7 +53,7 @@ exports.VehicleMediaCreateDTO = VehicleMediaCreateDTO;
|
|
|
48
53
|
class VehicleMediaFilterDTO {
|
|
49
54
|
validate() {
|
|
50
55
|
const errors = (0, class_validator_1.validateSync)(this);
|
|
51
|
-
return errors.map(error => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
56
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
52
57
|
}
|
|
53
58
|
static fromPlain(plain) {
|
|
54
59
|
return (0, class_transformer_1.plainToClass)(VehicleMediaFilterDTO, plain);
|
|
@@ -85,10 +90,30 @@ __decorate([
|
|
|
85
90
|
__metadata("design:type", Boolean)
|
|
86
91
|
], VehicleMediaFilterDTO.prototype, "isPrimary", void 0);
|
|
87
92
|
exports.VehicleMediaFilterDTO = VehicleMediaFilterDTO;
|
|
93
|
+
class VehicleMediaCreateS3UrlDTO {
|
|
94
|
+
constructor() { }
|
|
95
|
+
}
|
|
96
|
+
exports.VehicleMediaCreateS3UrlDTO = VehicleMediaCreateS3UrlDTO;
|
|
97
|
+
class S3MediaCreateURLDTO {
|
|
98
|
+
}
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, class_validator_1.IsString)(),
|
|
101
|
+
__metadata("design:type", String)
|
|
102
|
+
], S3MediaCreateURLDTO.prototype, "vehicleId", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, class_validator_1.IsString)(),
|
|
105
|
+
__metadata("design:type", String)
|
|
106
|
+
], S3MediaCreateURLDTO.prototype, "folder", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
109
|
+
(0, class_validator_1.IsArray)(),
|
|
110
|
+
__metadata("design:type", Array)
|
|
111
|
+
], S3MediaCreateURLDTO.prototype, "files", void 0);
|
|
112
|
+
exports.S3MediaCreateURLDTO = S3MediaCreateURLDTO;
|
|
88
113
|
class VehicleMediaUpdateDTO {
|
|
89
114
|
validate() {
|
|
90
115
|
const errors = (0, class_validator_1.validateSync)(this);
|
|
91
|
-
return errors.map(error => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
116
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
92
117
|
}
|
|
93
118
|
static fromPlain(plain) {
|
|
94
119
|
return (0, class_transformer_1.plainToClass)(VehicleMediaUpdateDTO, plain);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { BaseCreateDTO, BaseUpdateDTO } from "./BaseDTO";
|
|
2
|
+
import { Vehicle } from "../models/Vehicle";
|
|
3
|
+
import { VehicleMake } from "../models/VehicleMake";
|
|
4
|
+
import { VehicleModelFilter, VehicleModelOptions, VehicleModelUniqueFilter } from "../utilities";
|
|
5
5
|
export declare class VehicleModelGetDTO {
|
|
6
6
|
filter?: VehicleModelFilter;
|
|
7
7
|
options?: VehicleModelOptions;
|
|
@@ -11,7 +11,7 @@ export declare class VehicleModelGetDTO {
|
|
|
11
11
|
}
|
|
12
12
|
export declare class VehicleModelGetUniqueDTO {
|
|
13
13
|
filter?: VehicleModelUniqueFilter;
|
|
14
|
-
options?: Omit<VehicleModelOptions,
|
|
14
|
+
options?: Omit<VehicleModelOptions, "page" | "limit" | "sort">;
|
|
15
15
|
validate(): string[];
|
|
16
16
|
static fromPlain(plain: Record<string, unknown>): VehicleModelGetUniqueDTO;
|
|
17
17
|
toPlain(): Record<string, unknown>;
|
|
@@ -19,7 +19,7 @@ const VehicleMake_1 = require("../models/VehicleMake");
|
|
|
19
19
|
class VehicleModelGetDTO {
|
|
20
20
|
validate() {
|
|
21
21
|
const errors = (0, class_validator_1.validateSync)(this);
|
|
22
|
-
return errors.map(error => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
22
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
23
23
|
}
|
|
24
24
|
static fromPlain(plain) {
|
|
25
25
|
return (0, class_transformer_1.plainToClass)(VehicleModelGetDTO, plain);
|
|
@@ -32,7 +32,7 @@ exports.VehicleModelGetDTO = VehicleModelGetDTO;
|
|
|
32
32
|
class VehicleModelGetUniqueDTO {
|
|
33
33
|
validate() {
|
|
34
34
|
const errors = (0, class_validator_1.validateSync)(this);
|
|
35
|
-
return errors.map(error => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
35
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
36
36
|
}
|
|
37
37
|
static fromPlain(plain) {
|
|
38
38
|
return (0, class_transformer_1.plainToClass)(VehicleModelGetUniqueDTO, plain);
|
|
@@ -48,7 +48,7 @@ class VehicleModelCreateDTO extends BaseDTO_1.BaseCreateDTO {
|
|
|
48
48
|
// - We cannot create a attach vehicles and models to a make during creation because the make should be created first and then the vehicles and models should be created and attached to the make.
|
|
49
49
|
validate() {
|
|
50
50
|
const errors = (0, class_validator_1.validateSync)(this);
|
|
51
|
-
return errors.map(error => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
51
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
52
52
|
}
|
|
53
53
|
static fromPlain(plain) {
|
|
54
54
|
return (0, class_transformer_1.plainToClass)(VehicleModelCreateDTO, plain);
|
|
@@ -62,7 +62,7 @@ __decorate([
|
|
|
62
62
|
(0, class_validator_1.IsNotEmpty)(),
|
|
63
63
|
(0, class_validator_1.IsDefined)(),
|
|
64
64
|
(0, class_validator_1.Matches)(/^[a-zA-Z0-9\s\-\_]*$/, {
|
|
65
|
-
message:
|
|
65
|
+
message: "Name can only contain letters, numbers, spaces, hyphens, and underscores.",
|
|
66
66
|
}),
|
|
67
67
|
__metadata("design:type", String)
|
|
68
68
|
], VehicleModelCreateDTO.prototype, "name", void 0);
|
|
@@ -107,7 +107,7 @@ exports.VehicleModelCreateDTO = VehicleModelCreateDTO;
|
|
|
107
107
|
class VehicleModelUpdateDTO extends BaseDTO_1.BaseUpdateDTO {
|
|
108
108
|
validate() {
|
|
109
109
|
const errors = (0, class_validator_1.validateSync)(this);
|
|
110
|
-
return errors.map(error => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
110
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
111
111
|
}
|
|
112
112
|
static fromPlain(plain) {
|
|
113
113
|
return (0, class_transformer_1.plainToClass)(VehicleModelUpdateDTO, plain);
|
|
@@ -120,7 +120,7 @@ __decorate([
|
|
|
120
120
|
(0, class_validator_1.IsString)(),
|
|
121
121
|
(0, class_validator_1.IsOptional)(),
|
|
122
122
|
(0, class_validator_1.Matches)(/^[a-zA-Z0-9\s\-\_]*$/, {
|
|
123
|
-
message:
|
|
123
|
+
message: "Name can only contain letters, numbers, spaces, hyphens, and underscores.",
|
|
124
124
|
}),
|
|
125
125
|
__metadata("design:type", String)
|
|
126
126
|
], VehicleModelUpdateDTO.prototype, "name", void 0);
|
|
@@ -158,7 +158,7 @@ exports.VehicleModelUpdateDTO = VehicleModelUpdateDTO;
|
|
|
158
158
|
class DynamicModelDTO {
|
|
159
159
|
validate() {
|
|
160
160
|
if (!this.existingId && !this.new) {
|
|
161
|
-
throw new Error(
|
|
161
|
+
throw new Error("Either existingId or new details must be provided.");
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
static fromPlain(plain) {
|
|
@@ -12,7 +12,7 @@ export declare class VehicleBodyTypeGetUniqueDTO {
|
|
|
12
12
|
options?: Omit<VehicleBodyTypeOptions, 'sort' | 'page' | 'limit'>;
|
|
13
13
|
validate(): string[];
|
|
14
14
|
static fromPlain(plain: Record<string, unknown>): VehicleBodyTypeGetUniqueDTO;
|
|
15
|
-
|
|
15
|
+
toPlain(entity: any): Record<string, unknown>;
|
|
16
16
|
}
|
|
17
17
|
export declare class VehicleBodyTypeCreateDTO extends BaseCreateDTO {
|
|
18
18
|
name: string;
|
|
@@ -35,7 +35,7 @@ class VehicleBodyTypeGetUniqueDTO {
|
|
|
35
35
|
static fromPlain(plain) {
|
|
36
36
|
return (0, class_transformer_1.plainToClass)(VehicleBodyTypeGetUniqueDTO, plain);
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
toPlain(entity) {
|
|
39
39
|
return (0, class_transformer_1.instanceToPlain)(entity);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -10,3 +10,8 @@ export * from "./VehicleMedia";
|
|
|
10
10
|
export * from "./VehicleModelDTO";
|
|
11
11
|
export * from "./VehicleOrderDTO";
|
|
12
12
|
export * from "./VehicleTypeDTO";
|
|
13
|
+
export * from "./VehicleMedia";
|
|
14
|
+
export * from "./VehicleCategoryDTO";
|
|
15
|
+
export * from "./MediaDTO";
|
|
16
|
+
export * from "./VehicleInspectionDTO";
|
|
17
|
+
export * from "./VehicleFilterDTO";
|
|
@@ -26,3 +26,8 @@ __exportStar(require("./VehicleMedia"), exports);
|
|
|
26
26
|
__exportStar(require("./VehicleModelDTO"), exports);
|
|
27
27
|
__exportStar(require("./VehicleOrderDTO"), exports);
|
|
28
28
|
__exportStar(require("./VehicleTypeDTO"), exports);
|
|
29
|
+
__exportStar(require("./VehicleMedia"), exports);
|
|
30
|
+
__exportStar(require("./VehicleCategoryDTO"), exports);
|
|
31
|
+
__exportStar(require("./MediaDTO"), exports);
|
|
32
|
+
__exportStar(require("./VehicleInspectionDTO"), exports);
|
|
33
|
+
__exportStar(require("./VehicleFilterDTO"), exports);
|
|
@@ -17,4 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./dto"), exports);
|
|
18
18
|
__exportStar(require("./enums/index"), exports);
|
|
19
19
|
__exportStar(require("./models/_index"), exports);
|
|
20
|
-
|
|
20
|
+
// export * from "./utilities";
|
|
@@ -2,6 +2,9 @@ import { BaseModel } from "./Base";
|
|
|
2
2
|
import { Vehicle } from "./Vehicle";
|
|
3
3
|
export declare class VehicleFinance extends BaseModel {
|
|
4
4
|
vehicleId: string;
|
|
5
|
+
price: number;
|
|
6
|
+
vehiclePriceType: string;
|
|
7
|
+
vatInclusive: string;
|
|
5
8
|
interestPercentage: number;
|
|
6
9
|
monthlyInstallment: number;
|
|
7
10
|
financingYear: number;
|
|
@@ -6,6 +6,7 @@ import { VehicleMetaData } from "./models/VehicleMetaData";
|
|
|
6
6
|
import { VehicleModel } from "./models/VehicleModel";
|
|
7
7
|
import { VehicleCategory } from "./models/VehicleCategory";
|
|
8
8
|
import { BaseFilter, NumberRange, PaginationOptions } from "../../../global/utilities";
|
|
9
|
+
import { VehicleCategorySelectFields } from "./dto/VehicleFilterDTO";
|
|
9
10
|
export type VehicleMakeSelectFields = keyof VehicleMake;
|
|
10
11
|
export type VehicleModelSelectFields = keyof VehicleModel;
|
|
11
12
|
export type VehicleSelectFields = keyof Vehicle;
|
|
@@ -33,7 +34,7 @@ export declare class VehicleMakeUniqueFilter extends BaseFilter {
|
|
|
33
34
|
static fromPlain(plain: Record<string, unknown>): VehicleMakeFilter;
|
|
34
35
|
static toPlain(entity: any): Record<string, unknown>;
|
|
35
36
|
}
|
|
36
|
-
export type VehicleMakeSort = Partial<Record<keyof Pick<VehicleMake,
|
|
37
|
+
export type VehicleMakeSort = Partial<Record<keyof Pick<VehicleMake, "name" | "isActive" | "createdAt" | "updatedAt">, "asc" | "desc">>;
|
|
37
38
|
export declare class VehicleMakeOptions extends PaginationOptions {
|
|
38
39
|
sort?: VehicleMakeSort;
|
|
39
40
|
withModels?: boolean;
|
|
@@ -63,7 +64,7 @@ export declare class VehicleModelUniqueFilter extends BaseFilter {
|
|
|
63
64
|
static fromPlain(plain: Record<string, unknown>): VehicleModelUniqueFilter;
|
|
64
65
|
static toPlain(entity: any): Record<string, unknown>;
|
|
65
66
|
}
|
|
66
|
-
export type VehicleModelSort = Partial<Record<keyof Pick<VehicleModel,
|
|
67
|
+
export type VehicleModelSort = Partial<Record<keyof Pick<VehicleModel, "name" | "isActive" | "createdAt" | "updatedAt">, "asc" | "desc">>;
|
|
67
68
|
export declare class VehicleModelOptions extends PaginationOptions {
|
|
68
69
|
sort?: VehicleModelSort;
|
|
69
70
|
withVehicles?: boolean;
|
|
@@ -92,7 +93,7 @@ export declare class VehicleBodyTypeUniqueFilter {
|
|
|
92
93
|
static fromPlain(plain: Record<string, unknown>): VehicleModelFilter;
|
|
93
94
|
static toPlain(entity: any): Record<string, unknown>;
|
|
94
95
|
}
|
|
95
|
-
export type VehicleBodyTypeSort = Partial<Record<keyof Pick<VehicleBodyType,
|
|
96
|
+
export type VehicleBodyTypeSort = Partial<Record<keyof Pick<VehicleBodyType, "name" | "isActive" | "createdAt" | "updatedAt">, "asc" | "desc">>;
|
|
96
97
|
export declare class VehicleBodyTypeOptions extends PaginationOptions {
|
|
97
98
|
sort?: VehicleBodyTypeSort;
|
|
98
99
|
withVehicles?: boolean;
|
|
@@ -119,7 +120,7 @@ export declare class VehicleFeatureUniqueFilter {
|
|
|
119
120
|
static fromPlain(plain: Record<string, unknown>): VehicleModelFilter;
|
|
120
121
|
static toPlain(entity: any): Record<string, unknown>;
|
|
121
122
|
}
|
|
122
|
-
export type VehicleFeatureSort = Partial<Record<keyof Pick<VehicleFeature,
|
|
123
|
+
export type VehicleFeatureSort = Partial<Record<keyof Pick<VehicleFeature, "name" | "isActive" | "createdAt" | "updatedAt">, "asc" | "desc">>;
|
|
123
124
|
export declare class VehicleFeatureOptions extends PaginationOptions {
|
|
124
125
|
sort?: VehicleFeatureSort;
|
|
125
126
|
withCategories?: boolean;
|
|
@@ -146,7 +147,7 @@ export declare class VehicleFeatureCategoryUniqueFilter {
|
|
|
146
147
|
static fromPlain(plain: Record<string, unknown>): VehicleModelFilter;
|
|
147
148
|
static toPlain(entity: any): Record<string, unknown>;
|
|
148
149
|
}
|
|
149
|
-
export type VehicleFeatureCategorySort = Partial<Record<keyof Pick<VehicleCategory,
|
|
150
|
+
export type VehicleFeatureCategorySort = Partial<Record<keyof Pick<VehicleCategory, "name" | "isActive" | "createdAt" | "updatedAt">, "asc" | "desc">>;
|
|
150
151
|
export declare class VehicleFeatureCategoryOptions extends PaginationOptions {
|
|
151
152
|
sort?: VehicleFeatureCategorySort;
|
|
152
153
|
withFeatures?: boolean;
|
|
@@ -195,7 +196,7 @@ export declare class VehicleUniqueFilter {
|
|
|
195
196
|
static fromPlain(plain: Record<string, unknown>): VehicleUniqueFilter;
|
|
196
197
|
static toPlain(entity: any): Record<string, unknown>;
|
|
197
198
|
}
|
|
198
|
-
export type VehicleSort = Partial<Record<keyof Pick<Vehicle,
|
|
199
|
+
export type VehicleSort = Partial<Record<keyof Pick<Vehicle, "referenceNumber" | "mileage" | "year" | "createdAt" | "updatedAt" | "engineCapacity" | "doors" | "seats" | "keys" | "transmission" | "driveType" | "price" | "status">, "asc" | "desc">>;
|
|
199
200
|
export declare class VehicleOptions extends PaginationOptions {
|
|
200
201
|
sort?: VehicleSort;
|
|
201
202
|
select?: (VehicleSelectFields | `make.${VehicleMakeSelectFields}` | `model.${VehicleModelSelectFields}` | `bodyType.${VehicleBodyTypeSelectFields}` | `features.${VehicleFeatureSelectFields}` | `metaData.${VehicleMetaDataSelectFields}`)[];
|
|
@@ -209,3 +210,28 @@ export declare class VehicleOptions extends PaginationOptions {
|
|
|
209
210
|
static fromPlain(plain: Record<string, unknown>): VehicleOptions;
|
|
210
211
|
static toPlain(entity: any): Record<string, unknown>;
|
|
211
212
|
}
|
|
213
|
+
export declare class VehicleCategoryFilter extends BaseFilter {
|
|
214
|
+
id?: string | string[];
|
|
215
|
+
slug?: string | string[];
|
|
216
|
+
name?: string;
|
|
217
|
+
search?: string;
|
|
218
|
+
validate(): string[];
|
|
219
|
+
static fromPlain(plain: Record<string, unknown>): VehicleCategoryFilter;
|
|
220
|
+
static toPlain(entity: VehicleCategoryFilter): Record<string, unknown>;
|
|
221
|
+
}
|
|
222
|
+
export declare class VehicleCategoryUniqueFilter {
|
|
223
|
+
id?: string;
|
|
224
|
+
slug?: string;
|
|
225
|
+
name?: string;
|
|
226
|
+
validate(): string[];
|
|
227
|
+
static fromPlain(plain: Record<string, unknown>): VehicleCategoryUniqueFilter;
|
|
228
|
+
static toPlain(entity: VehicleCategoryUniqueFilter): Record<string, unknown>;
|
|
229
|
+
}
|
|
230
|
+
export type VehicleCategorySort = Record<keyof Pick<VehicleCategory, "name" | "isActive" | "createdAt" | "updatedAt">, "asc" | "desc">;
|
|
231
|
+
export declare class VehicleCategoryOptions extends PaginationOptions {
|
|
232
|
+
sort?: VehicleCategorySort;
|
|
233
|
+
select?: (VehicleCategorySelectFields | `features.${VehicleFeatureSelectFields}`)[];
|
|
234
|
+
validate(): string[];
|
|
235
|
+
static fromPlain(plain: Record<string, unknown>): VehicleFeatureOptions;
|
|
236
|
+
static toPlain(entity: VehicleCategoryOptions): Record<string, unknown>;
|
|
237
|
+
}
|