@alba-cars/common-modules 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/core/network/endpoint-config.d.ts +26 -5
  2. package/dist/core/network/endpoint-config.js +9 -0
  3. package/dist/features/blog/data/dto/BlogDTO.d.ts +5 -2
  4. package/dist/features/blog/data/dto/BlogDTO.js +15 -7
  5. package/dist/features/index.d.ts +1 -0
  6. package/dist/features/index.js +1 -0
  7. package/dist/features/lead/data/dto/lead_dto.d.ts +26 -0
  8. package/dist/features/lead/data/dto/lead_dto.js +103 -0
  9. package/dist/features/lead/data/dto/lead_prefernce_dto.d.ts +11 -0
  10. package/dist/features/lead/data/dto/lead_prefernce_dto.js +59 -0
  11. package/dist/features/lead/data/enum/lead_source_status_types.d.ts +8 -0
  12. package/dist/features/lead/data/enum/lead_source_status_types.js +12 -0
  13. package/dist/features/lead/data/enum/lead_status_type.d.ts +8 -0
  14. package/dist/features/lead/data/enum/lead_status_type.js +12 -0
  15. package/dist/features/vehicle/data/dto/SimilarVehicleDTO.d.ts +8 -0
  16. package/dist/features/vehicle/data/dto/SimilarVehicleDTO.js +28 -0
  17. package/dist/features/vehicle/data/dto/VehicleFilterDTO.d.ts +1 -0
  18. package/dist/features/vehicle/data/dto/VehicleMedia.d.ts +1 -0
  19. package/dist/features/vehicle/data/dto/VehicleMedia.js +4 -0
  20. package/dist/features/vehicle/data/dto/index.d.ts +1 -0
  21. package/dist/features/vehicle/data/dto/index.js +1 -0
  22. package/dist/features/vehicle/data/utilities.d.ts +1 -0
  23. package/dist/features/vehicle/data/utilities.js +0 -1202
  24. package/dist/features/vehicle-reservations/data/dto/VehicleReservationDTO.d.ts +95 -0
  25. package/dist/features/vehicle-reservations/data/dto/VehicleReservationDTO.js +323 -0
  26. package/dist/features/vehicle-reservations/data/dto/index.d.ts +1 -0
  27. package/dist/features/vehicle-reservations/data/dto/index.js +17 -0
  28. package/dist/features/vehicle-reservations/data/enums/finance-type.d.ts +5 -0
  29. package/dist/features/vehicle-reservations/data/enums/finance-type.js +9 -0
  30. package/dist/features/vehicle-reservations/data/enums/index.d.ts +3 -0
  31. package/dist/features/vehicle-reservations/data/enums/index.js +19 -0
  32. package/dist/features/vehicle-reservations/data/enums/reservation-type.d.ts +9 -0
  33. package/dist/features/vehicle-reservations/data/enums/reservation-type.js +13 -0
  34. package/dist/features/vehicle-reservations/data/enums/vehicle-reservation-type.d.ts +4 -0
  35. package/dist/features/vehicle-reservations/data/enums/vehicle-reservation-type.js +8 -0
  36. package/dist/features/vehicle-reservations/index.d.ts +2 -0
  37. package/dist/features/vehicle-reservations/index.js +18 -0
  38. package/package.json +1 -1
@@ -3,15 +3,36 @@ interface BaseEndpoint {
3
3
  getAll: string | EndpointFunction;
4
4
  create: string | EndpointFunction;
5
5
  getOne: EndpointFunction;
6
- getOneBySlug?: EndpointFunction;
7
6
  deleteOne: EndpointFunction;
8
7
  updateOne: EndpointFunction;
9
8
  }
10
- type ExtendedEndpoint = BaseEndpoint & {
11
- [key: string]: string | EndpointFunction;
9
+ interface VehicleEndpoints extends BaseEndpoint {
10
+ getSimilar: EndpointFunction;
11
+ getOneBySlug: EndpointFunction;
12
+ }
13
+ interface BlogEndpoints extends BaseEndpoint {
14
+ getOneBySlug: EndpointFunction;
15
+ }
16
+ type APIEndpointType = {
17
+ vehicle: VehicleEndpoints;
18
+ blogs: BlogEndpoints;
19
+ vehicleDetails: BaseEndpoint;
20
+ vehicleFinance: BaseEndpoint;
21
+ TestDrive: BaseEndpoint;
22
+ vehicleMake: BaseEndpoint;
23
+ vehicleModel: BaseEndpoint;
24
+ vehicleMeta: BaseEndpoint;
25
+ vehicleInspection: BaseEndpoint;
26
+ vehicleOrder: BaseEndpoint;
27
+ vehicleType: BaseEndpoint;
28
+ carOptions: BaseEndpoint;
29
+ payment: BaseEndpoint;
30
+ agents: BaseEndpoint;
31
+ showroomVisit: BaseEndpoint;
32
+ sellCarRequest: BaseEndpoint;
33
+ financeEligibilityRequest: BaseEndpoint;
34
+ vehicleReservations: BaseEndpoint;
12
35
  };
13
- type APIEndpointKeys = "vehicle" | "vehicleDetails" | "vehicleFinance" | "TestDrive" | "vehicleMake" | "vehicleModel" | "vehicleMeta" | "vehicleInspection" | "vehicleOrder" | "vehicleType" | "carOptions" | "payment" | "agents" | "blogs" | "showroomVisit" | "sellCarRequest" | "financeEligibilityRequest";
14
- type APIEndpointType = Record<APIEndpointKeys, ExtendedEndpoint>;
15
36
  export declare const API_ENDPOINTS: APIEndpointType;
16
37
  export declare const UTIL_ENDPOINTS: {
17
38
  media: {
@@ -6,6 +6,8 @@ exports.API_ENDPOINTS = {
6
6
  getAll: `/vehicle`,
7
7
  create: `/vehicle`,
8
8
  getOne: (id) => `/vehicle/${id}`,
9
+ getOneBySlug: (slug) => `/vehicle/slug/${slug}`,
10
+ getSimilar: (id) => `/vehicle/similar/${id}`,
9
11
  deleteOne: (id) => `/vehicle/${id}`,
10
12
  updateOne: (id) => `/vehicle/${id}`,
11
13
  },
@@ -122,6 +124,13 @@ exports.API_ENDPOINTS = {
122
124
  deleteOne: (id) => `/finance-eligibility-request/${id}`,
123
125
  updateOne: (id) => `/finance-eligibility-request/${id}`,
124
126
  },
127
+ vehicleReservations: {
128
+ getAll: `/vehicle-reservation`,
129
+ create: `/vehicle-reservation`,
130
+ getOne: (id) => `/vehicle-reservation/${id}`,
131
+ deleteOne: (id) => `/vehicle-reservation/${id}`,
132
+ updateOne: (id) => `/vehicle-reservation/${id}`,
133
+ }
125
134
  };
126
135
  exports.UTIL_ENDPOINTS = {
127
136
  media: {
@@ -2,6 +2,7 @@ export declare class BlogGetDTO {
2
2
  id: string;
3
3
  title: string;
4
4
  description: string;
5
+ content: string;
5
6
  date: Date;
6
7
  imageLink: string;
7
8
  imageAlt: string;
@@ -16,7 +17,8 @@ export declare class BlogGetDTO {
16
17
  export declare class BlogCreateDTO {
17
18
  title: string;
18
19
  description: string;
19
- date: Date;
20
+ content: string;
21
+ date: string;
20
22
  imageLink: string;
21
23
  imageAlt: string;
22
24
  metaDescription: string;
@@ -29,7 +31,8 @@ export declare class BlogCreateDTO {
29
31
  export declare class BlogUpdateDTO {
30
32
  title?: string;
31
33
  description?: string;
32
- date?: Date;
34
+ content?: string;
35
+ date?: string;
33
36
  imageLink?: string;
34
37
  imageAlt?: string;
35
38
  metaDescription?: string;
@@ -23,11 +23,11 @@ class BlogGetDTO {
23
23
  exports.BlogGetDTO = BlogGetDTO;
24
24
  class BlogCreateDTO {
25
25
  constructor() {
26
- this.status = 'draft';
26
+ this.status = "draft";
27
27
  }
28
28
  validate() {
29
29
  const errors = (0, class_validator_1.validateSync)(this);
30
- return errors.map(error => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
30
+ return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
31
31
  }
32
32
  static fromPlain(plain) {
33
33
  return (0, class_transformer_1.plainToClass)(BlogCreateDTO, plain);
@@ -42,8 +42,12 @@ __decorate([
42
42
  __metadata("design:type", String)
43
43
  ], BlogCreateDTO.prototype, "description", void 0);
44
44
  __decorate([
45
- (0, class_validator_1.IsDate)(),
46
- __metadata("design:type", Date)
45
+ (0, class_validator_1.IsString)(),
46
+ __metadata("design:type", String)
47
+ ], BlogCreateDTO.prototype, "content", void 0);
48
+ __decorate([
49
+ (0, class_validator_1.IsDateString)(),
50
+ __metadata("design:type", String)
47
51
  ], BlogCreateDTO.prototype, "date", void 0);
48
52
  __decorate([
49
53
  (0, class_validator_1.IsString)(),
@@ -74,7 +78,7 @@ exports.BlogCreateDTO = BlogCreateDTO;
74
78
  class BlogUpdateDTO {
75
79
  validate() {
76
80
  const errors = (0, class_validator_1.validateSync)(this);
77
- return errors.map(error => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
81
+ return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
78
82
  }
79
83
  static fromPlain(plain) {
80
84
  return (0, class_transformer_1.plainToClass)(BlogUpdateDTO, plain);
@@ -90,10 +94,14 @@ __decorate([
90
94
  (0, class_validator_1.IsString)(),
91
95
  __metadata("design:type", String)
92
96
  ], BlogUpdateDTO.prototype, "description", void 0);
97
+ __decorate([
98
+ (0, class_validator_1.IsString)(),
99
+ __metadata("design:type", String)
100
+ ], BlogUpdateDTO.prototype, "content", void 0);
93
101
  __decorate([
94
102
  (0, class_validator_1.IsOptional)(),
95
- (0, class_validator_1.IsDate)(),
96
- __metadata("design:type", Date)
103
+ (0, class_validator_1.IsDateString)(),
104
+ __metadata("design:type", String)
97
105
  ], BlogUpdateDTO.prototype, "date", void 0);
98
106
  __decorate([
99
107
  (0, class_validator_1.IsOptional)(),
@@ -6,3 +6,4 @@ export * from "./test-drive-request";
6
6
  export * from "./vehicle";
7
7
  export * from "./sell-call-request";
8
8
  export * from "./finance-eligibilty-request";
9
+ export * from "./vehicle-reservations";
@@ -22,3 +22,4 @@ __exportStar(require("./test-drive-request"), exports);
22
22
  __exportStar(require("./vehicle"), exports);
23
23
  __exportStar(require("./sell-call-request"), exports);
24
24
  __exportStar(require("./finance-eligibilty-request"), exports);
25
+ __exportStar(require("./vehicle-reservations"), exports);
@@ -0,0 +1,26 @@
1
+ import { LeadStatus } from "../enum/lead_status_type";
2
+ import { LeadSource } from "../enum/lead_source_status_types";
3
+ import { LeadPreferencesDTO } from "./lead_prefernce_dto";
4
+ export declare class LeadDTO {
5
+ id?: string;
6
+ firstName: string;
7
+ lastName: string;
8
+ email?: string;
9
+ phone: string;
10
+ alternatePhone?: string;
11
+ address?: string;
12
+ city?: string;
13
+ state?: string;
14
+ zipCode?: string;
15
+ status: LeadStatus;
16
+ notes?: string;
17
+ leadSource: LeadSource;
18
+ isTestDriveScheduled: boolean;
19
+ testDriveDate?: Date;
20
+ isActive: boolean;
21
+ lastContactedAt?: Date;
22
+ preference?: LeadPreferencesDTO;
23
+ validate(): string[];
24
+ static fromPlain(plain: Record<string, unknown>): LeadDTO;
25
+ toPlain(): Record<string, unknown>;
26
+ }
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.LeadDTO = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const lead_prefernce_dto_1 = require("./lead_prefernce_dto");
15
+ const class_transformer_1 = require("class-transformer");
16
+ class LeadDTO {
17
+ validate() {
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();
20
+ }
21
+ static fromPlain(plain) {
22
+ return (0, class_transformer_1.plainToClass)(LeadDTO, plain);
23
+ }
24
+ toPlain() {
25
+ return (0, class_transformer_1.classToPlain)(this);
26
+ }
27
+ }
28
+ __decorate([
29
+ (0, class_validator_1.IsUUID)(),
30
+ __metadata("design:type", String)
31
+ ], LeadDTO.prototype, "id", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsString)(),
34
+ __metadata("design:type", String)
35
+ ], LeadDTO.prototype, "firstName", void 0);
36
+ __decorate([
37
+ (0, class_validator_1.IsString)(),
38
+ __metadata("design:type", String)
39
+ ], LeadDTO.prototype, "lastName", void 0);
40
+ __decorate([
41
+ (0, class_validator_1.IsOptional)(),
42
+ (0, class_validator_1.IsString)(),
43
+ __metadata("design:type", String)
44
+ ], LeadDTO.prototype, "email", void 0);
45
+ __decorate([
46
+ (0, class_validator_1.IsString)(),
47
+ __metadata("design:type", String)
48
+ ], LeadDTO.prototype, "phone", void 0);
49
+ __decorate([
50
+ (0, class_validator_1.IsString)(),
51
+ (0, class_validator_1.IsOptional)(),
52
+ __metadata("design:type", String)
53
+ ], LeadDTO.prototype, "alternatePhone", void 0);
54
+ __decorate([
55
+ (0, class_validator_1.IsString)(),
56
+ (0, class_validator_1.IsOptional)(),
57
+ __metadata("design:type", String)
58
+ ], LeadDTO.prototype, "address", void 0);
59
+ __decorate([
60
+ (0, class_validator_1.IsString)(),
61
+ (0, class_validator_1.IsOptional)(),
62
+ __metadata("design:type", String)
63
+ ], LeadDTO.prototype, "city", void 0);
64
+ __decorate([
65
+ (0, class_validator_1.IsString)(),
66
+ (0, class_validator_1.IsOptional)(),
67
+ __metadata("design:type", String)
68
+ ], LeadDTO.prototype, "state", void 0);
69
+ __decorate([
70
+ (0, class_validator_1.IsString)(),
71
+ (0, class_validator_1.IsOptional)(),
72
+ __metadata("design:type", String)
73
+ ], LeadDTO.prototype, "zipCode", void 0);
74
+ __decorate([
75
+ (0, class_validator_1.IsString)(),
76
+ (0, class_validator_1.IsOptional)(),
77
+ __metadata("design:type", String)
78
+ ], LeadDTO.prototype, "notes", void 0);
79
+ __decorate([
80
+ (0, class_validator_1.IsBoolean)(),
81
+ (0, class_validator_1.IsOptional)(),
82
+ __metadata("design:type", Boolean)
83
+ ], LeadDTO.prototype, "isTestDriveScheduled", void 0);
84
+ __decorate([
85
+ (0, class_validator_1.IsString)(),
86
+ (0, class_validator_1.IsOptional)(),
87
+ __metadata("design:type", Date)
88
+ ], LeadDTO.prototype, "testDriveDate", void 0);
89
+ __decorate([
90
+ (0, class_validator_1.IsBoolean)(),
91
+ (0, class_validator_1.IsOptional)(),
92
+ __metadata("design:type", Boolean)
93
+ ], LeadDTO.prototype, "isActive", void 0);
94
+ __decorate([
95
+ (0, class_validator_1.IsDate)(),
96
+ (0, class_validator_1.IsOptional)(),
97
+ __metadata("design:type", Date)
98
+ ], LeadDTO.prototype, "lastContactedAt", void 0);
99
+ __decorate([
100
+ (0, class_validator_1.IsOptional)(),
101
+ __metadata("design:type", lead_prefernce_dto_1.LeadPreferencesDTO)
102
+ ], LeadDTO.prototype, "preference", void 0);
103
+ exports.LeadDTO = LeadDTO;
@@ -0,0 +1,11 @@
1
+ export declare class LeadPreferencesDTO {
2
+ budgetMin?: number;
3
+ budgetMax?: number;
4
+ preferredMake?: string;
5
+ preferredModel?: string;
6
+ preferredYearMin?: number;
7
+ preferredYearMax?: number;
8
+ preferredColors?: string[];
9
+ preferredFeatures?: string[];
10
+ additionalPreferences?: string;
11
+ }
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.LeadPreferencesDTO = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class LeadPreferencesDTO {
15
+ }
16
+ __decorate([
17
+ (0, class_validator_1.IsOptional)(),
18
+ (0, class_validator_1.IsNumber)(),
19
+ __metadata("design:type", Number)
20
+ ], LeadPreferencesDTO.prototype, "budgetMin", void 0);
21
+ __decorate([
22
+ (0, class_validator_1.IsOptional)(),
23
+ (0, class_validator_1.IsNumber)(),
24
+ __metadata("design:type", Number)
25
+ ], LeadPreferencesDTO.prototype, "budgetMax", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsOptional)(),
28
+ (0, class_validator_1.IsString)(),
29
+ __metadata("design:type", String)
30
+ ], LeadPreferencesDTO.prototype, "preferredMake", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsOptional)(),
33
+ (0, class_validator_1.IsString)(),
34
+ __metadata("design:type", String)
35
+ ], LeadPreferencesDTO.prototype, "preferredModel", void 0);
36
+ __decorate([
37
+ (0, class_validator_1.IsOptional)(),
38
+ (0, class_validator_1.IsNumber)(),
39
+ __metadata("design:type", Number)
40
+ ], LeadPreferencesDTO.prototype, "preferredYearMin", void 0);
41
+ __decorate([
42
+ (0, class_validator_1.IsOptional)(),
43
+ (0, class_validator_1.IsNumber)(),
44
+ __metadata("design:type", Number)
45
+ ], LeadPreferencesDTO.prototype, "preferredYearMax", void 0);
46
+ __decorate([
47
+ (0, class_validator_1.IsOptional)(),
48
+ __metadata("design:type", Array)
49
+ ], LeadPreferencesDTO.prototype, "preferredColors", void 0);
50
+ __decorate([
51
+ (0, class_validator_1.IsOptional)(),
52
+ __metadata("design:type", Array)
53
+ ], LeadPreferencesDTO.prototype, "preferredFeatures", void 0);
54
+ __decorate([
55
+ (0, class_validator_1.IsOptional)(),
56
+ (0, class_validator_1.IsString)(),
57
+ __metadata("design:type", String)
58
+ ], LeadPreferencesDTO.prototype, "additionalPreferences", void 0);
59
+ exports.LeadPreferencesDTO = LeadPreferencesDTO;
@@ -0,0 +1,8 @@
1
+ export declare enum LeadSource {
2
+ WEBSITE = "WEBSITE",
3
+ PHONE = "PHONE",
4
+ WALK_IN = "WALK_IN",
5
+ REFERRAL = "REFERRAL",
6
+ SOCIAL_MEDIA = "SOCIAL_MEDIA",
7
+ OTHER = "OTHER"
8
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LeadSource = void 0;
4
+ var LeadSource;
5
+ (function (LeadSource) {
6
+ LeadSource["WEBSITE"] = "WEBSITE";
7
+ LeadSource["PHONE"] = "PHONE";
8
+ LeadSource["WALK_IN"] = "WALK_IN";
9
+ LeadSource["REFERRAL"] = "REFERRAL";
10
+ LeadSource["SOCIAL_MEDIA"] = "SOCIAL_MEDIA";
11
+ LeadSource["OTHER"] = "OTHER";
12
+ })(LeadSource = exports.LeadSource || (exports.LeadSource = {}));
@@ -0,0 +1,8 @@
1
+ export declare enum LeadStatus {
2
+ NEW = "NEW",
3
+ CONTACTED = "CONTACTED",
4
+ QUALIFIED = "QUALIFIED",
5
+ NEGOTIATING = "NEGOTIATING",
6
+ CLOSED_WON = "CLOSED_WON",
7
+ CLOSED_LOST = "CLOSED_LOST"
8
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LeadStatus = void 0;
4
+ var LeadStatus;
5
+ (function (LeadStatus) {
6
+ LeadStatus["NEW"] = "NEW";
7
+ LeadStatus["CONTACTED"] = "CONTACTED";
8
+ LeadStatus["QUALIFIED"] = "QUALIFIED";
9
+ LeadStatus["NEGOTIATING"] = "NEGOTIATING";
10
+ LeadStatus["CLOSED_WON"] = "CLOSED_WON";
11
+ LeadStatus["CLOSED_LOST"] = "CLOSED_LOST";
12
+ })(LeadStatus = exports.LeadStatus || (exports.LeadStatus = {}));
@@ -0,0 +1,8 @@
1
+ export declare class GetSimilarVehiclesDTO {
2
+ vehicleId: string;
3
+ priceRange?: number;
4
+ limit?: number;
5
+ options?: Record<string, any>;
6
+ static fromPlain(data: any): GetSimilarVehiclesDTO;
7
+ validate(): string[];
8
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetSimilarVehiclesDTO = void 0;
4
+ class GetSimilarVehiclesDTO {
5
+ static fromPlain(data) {
6
+ const dto = new GetSimilarVehiclesDTO();
7
+ dto.vehicleId = data.vehicleId;
8
+ dto.priceRange = data.priceRange;
9
+ dto.limit = data.limit;
10
+ dto.options = data.options;
11
+ return dto;
12
+ }
13
+ validate() {
14
+ const errors = [];
15
+ if (!this.vehicleId) {
16
+ errors.push("Vehicle ID is required");
17
+ }
18
+ if (this.priceRange !== undefined &&
19
+ (isNaN(this.priceRange) || this.priceRange < 0)) {
20
+ errors.push("Price range must be a positive number");
21
+ }
22
+ if (this.limit !== undefined && (isNaN(this.limit) || this.limit < 1)) {
23
+ errors.push("Limit must be a positive number");
24
+ }
25
+ return errors;
26
+ }
27
+ }
28
+ exports.GetSimilarVehiclesDTO = GetSimilarVehiclesDTO;
@@ -224,6 +224,7 @@ export declare class VehicleOptions extends PaginationOptions {
224
224
  withBodyType?: boolean;
225
225
  withFeatures?: boolean;
226
226
  withMetaData?: boolean;
227
+ withFinance?: boolean;
227
228
  validate(): string[];
228
229
  static fromPlain(plain: Record<string, unknown>): VehicleOptions;
229
230
  static toPlain(entity: any): Record<string, unknown>;
@@ -1,6 +1,7 @@
1
1
  import { VehicleMediaType } from "../enums";
2
2
  import { FileInput } from "../../../../core";
3
3
  export declare class VehicleMediaCreateDTO {
4
+ vehicleId: string;
4
5
  mediaType: VehicleMediaType;
5
6
  mediaUrl: string;
6
7
  placeholder: string;
@@ -25,6 +25,10 @@ class VehicleMediaCreateDTO {
25
25
  return (0, class_transformer_1.instanceToPlain)(entity);
26
26
  }
27
27
  }
28
+ __decorate([
29
+ (0, class_validator_1.IsString)({ each: true }),
30
+ __metadata("design:type", String)
31
+ ], VehicleMediaCreateDTO.prototype, "vehicleId", void 0);
28
32
  __decorate([
29
33
  (0, class_validator_1.IsEnum)(enums_1.VehicleMediaType),
30
34
  __metadata("design:type", String)
@@ -15,3 +15,4 @@ export * from "./VehicleCategoryDTO";
15
15
  export * from "./MediaDTO";
16
16
  export * from "./VehicleInspectionDTO";
17
17
  export * from "./VehicleFilterDTO";
18
+ export * from "./SimilarVehicleDTO";
@@ -31,3 +31,4 @@ __exportStar(require("./VehicleCategoryDTO"), exports);
31
31
  __exportStar(require("./MediaDTO"), exports);
32
32
  __exportStar(require("./VehicleInspectionDTO"), exports);
33
33
  __exportStar(require("./VehicleFilterDTO"), exports);
34
+ __exportStar(require("./SimilarVehicleDTO"), exports);
@@ -205,6 +205,7 @@ export declare class VehicleOptions extends PaginationOptions {
205
205
  withBodyType?: boolean;
206
206
  withFeatures?: boolean;
207
207
  withMetaData?: boolean;
208
+ withFinance?: boolean;
208
209
  validate?: (shouldValidate?: boolean) => string[];
209
210
  constructor(shouldIncludeValidate?: boolean);
210
211
  static fromPlain(plain: Record<string, unknown>): VehicleOptions;