@alba-cars/common-modules 1.2.6 → 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.
Files changed (70) hide show
  1. package/dist/core/error-handling/errorHandler.d.ts +1 -1
  2. package/dist/core/error-handling/errorHandler.js +36 -10
  3. package/dist/core/models/index.d.ts +1 -0
  4. package/dist/core/models/index.js +1 -0
  5. package/dist/core/models/media/index.d.ts +1 -0
  6. package/dist/core/models/media/index.js +17 -0
  7. package/dist/core/models/media/media_data.d.ts +4 -0
  8. package/dist/core/models/media/media_data.js +2 -0
  9. package/dist/core/network/endpoint-config.d.ts +8 -1
  10. package/dist/core/network/endpoint-config.js +55 -6
  11. package/dist/core/network/fetch-api.js +24 -20
  12. package/dist/core/network/index.d.ts +0 -1
  13. package/dist/core/network/index.js +0 -1
  14. package/dist/core/network/react-query.d.ts +3 -9
  15. package/dist/core/utils/global_validators.d.ts +2 -0
  16. package/dist/core/utils/global_validators.js +20 -0
  17. package/dist/core/utils/index.d.ts +1 -0
  18. package/dist/core/utils/index.js +1 -0
  19. package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.d.ts +92 -0
  20. package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.js +286 -0
  21. package/dist/features/finance-eligibilty-request/data/index.d.ts +1 -0
  22. package/dist/features/finance-eligibilty-request/data/index.js +17 -0
  23. package/dist/features/finance-eligibilty-request/index.d.ts +1 -0
  24. package/dist/features/finance-eligibilty-request/index.js +17 -0
  25. package/dist/features/index.d.ts +7 -5
  26. package/dist/features/index.js +2 -0
  27. package/dist/features/sales-team/index.d.ts +0 -1
  28. package/dist/features/sales-team/index.js +0 -1
  29. package/dist/features/sell-call-request/data/dto/SellCarRequestDTO.d.ts +134 -0
  30. package/dist/features/sell-call-request/data/dto/SellCarRequestDTO.js +394 -0
  31. package/dist/features/sell-call-request/data/index.d.ts +1 -0
  32. package/dist/features/sell-call-request/data/index.js +17 -0
  33. package/dist/features/sell-call-request/index.d.ts +1 -0
  34. package/dist/features/sell-call-request/index.js +17 -0
  35. package/dist/features/showroom-visit/data/dto/ShowroomVisit.d.ts +27 -2
  36. package/dist/features/showroom-visit/data/dto/ShowroomVisit.js +86 -5
  37. package/dist/features/test-drive-request/data/dto/TestDriveRequestDTO.d.ts +9 -6
  38. package/dist/features/test-drive-request/data/dto/TestDriveRequestDTO.js +16 -3
  39. package/dist/features/vehicle/data/dto/MediaDTO.d.ts +5 -0
  40. package/dist/features/vehicle/data/dto/MediaDTO.js +2 -0
  41. package/dist/features/vehicle/data/dto/VehicleCategoryDTO.d.ts +39 -0
  42. package/dist/features/vehicle/data/dto/VehicleCategoryDTO.js +114 -0
  43. package/dist/features/vehicle/data/dto/VehicleDTO.d.ts +16 -8
  44. package/dist/features/vehicle/data/dto/VehicleDTO.js +43 -6
  45. package/dist/features/vehicle/data/dto/VehicleFilterDTO.d.ts +230 -0
  46. package/dist/features/vehicle/data/dto/VehicleFilterDTO.js +705 -0
  47. package/dist/features/vehicle/data/dto/VehicleFinanceDTO.d.ts +23 -12
  48. package/dist/features/vehicle/data/dto/VehicleFinanceDTO.js +41 -1
  49. package/dist/features/vehicle/data/dto/VehicleInspectionDTO.d.ts +147 -0
  50. package/dist/features/vehicle/data/dto/VehicleInspectionDTO.js +765 -0
  51. package/dist/features/vehicle/data/dto/VehicleMedia.d.ts +14 -0
  52. package/dist/features/vehicle/data/dto/VehicleMedia.js +29 -4
  53. package/dist/features/vehicle/data/dto/VehicleModelDTO.d.ts +5 -5
  54. package/dist/features/vehicle/data/dto/VehicleModelDTO.js +7 -7
  55. package/dist/features/vehicle/data/dto/VehicleTypeDTO.d.ts +1 -1
  56. package/dist/features/vehicle/data/dto/VehicleTypeDTO.js +1 -1
  57. package/dist/features/vehicle/data/dto/index.d.ts +5 -0
  58. package/dist/features/vehicle/data/dto/index.js +5 -0
  59. package/dist/features/vehicle/data/index.d.ts +0 -1
  60. package/dist/features/vehicle/data/index.js +1 -1
  61. package/dist/features/vehicle/data/models/VehicleFeature.d.ts +1 -0
  62. package/dist/features/vehicle/data/models/VehicleFeatureCategory.d.ts +1 -0
  63. package/dist/features/vehicle/data/models/VehicleFinance.d.ts +3 -0
  64. package/dist/features/vehicle/data/utilities.d.ts +32 -6
  65. package/dist/features/vehicle/data/utilities.js +1222 -19
  66. package/dist/features/vehicle/index.d.ts +0 -1
  67. package/dist/features/vehicle/index.js +0 -1
  68. package/dist/global/utilities.d.ts +4 -0
  69. package/dist/global/utilities.js +3 -1
  70. package/package.json +2 -2
@@ -1,36 +1,44 @@
1
1
  export declare class VehicleFinanceGetDTO {
2
2
  id: string;
3
+ price: number;
3
4
  vehicleId: string;
5
+ vehiclePriceType: string;
6
+ vatInclusive: string;
4
7
  interestPercentage: number;
5
8
  monthlyInstallment: number;
6
9
  financingYear: number;
7
10
  interestPerYear: number;
8
- totalReductionAmount: number;
9
- reductionDuration: number;
10
- durationShow: string;
11
- reductionInterval: number;
12
- minimumBidAmount: number;
13
- initialDepositAmount: number;
11
+ totalReductionAmount?: number;
12
+ reductionDuration?: number;
13
+ durationShow?: string;
14
+ reductionInterval?: number;
15
+ minimumBidAmount?: number;
16
+ initialDepositAmount?: number;
14
17
  static fromEntity(entity: any): VehicleFinanceGetDTO;
15
18
  toPlain(): Record<string, unknown>;
16
19
  }
17
20
  export declare class VehicleFinanceCreateDTO {
18
21
  vehicleId: string;
22
+ price: number;
19
23
  interestPercentage: number;
20
24
  monthlyInstallment: number;
21
25
  financingYear: number;
22
26
  interestPerYear: number;
23
- totalReductionAmount: number;
24
- reductionDuration: number;
25
- durationShow: string;
26
- reductionInterval: number;
27
- minimumBidAmount: number;
28
- initialDepositAmount: number;
27
+ totalReductionAmount?: number;
28
+ reductionDuration?: number;
29
+ durationShow?: string;
30
+ vehiclePriceType?: string;
31
+ reductionInterval?: number;
32
+ minimumBidAmount?: number;
33
+ initialDepositAmount?: number;
34
+ vatInclusive: string;
29
35
  validate(): string[];
30
36
  static fromPlain(plain: Record<string, unknown>): VehicleFinanceCreateDTO;
37
+ toPlain(): Record<string, unknown>;
31
38
  }
32
39
  export declare class VehicleFinanceUpdateDTO {
33
40
  vehicleId?: string;
41
+ price?: number;
34
42
  interestPercentage?: number;
35
43
  monthlyInstallment?: number;
36
44
  financingYear?: number;
@@ -41,6 +49,9 @@ export declare class VehicleFinanceUpdateDTO {
41
49
  reductionInterval?: number;
42
50
  minimumBidAmount?: number;
43
51
  initialDepositAmount?: number;
52
+ vehiclePriceType?: string;
53
+ vatInclusive?: string;
44
54
  validate(): string[];
45
55
  static fromPlain(plain: Record<string, unknown>): VehicleFinanceUpdateDTO;
56
+ toPlain(): Record<string, unknown>;
46
57
  }
@@ -18,7 +18,7 @@ class VehicleFinanceGetDTO {
18
18
  return (0, class_transformer_1.plainToClass)(VehicleFinanceGetDTO, entity);
19
19
  }
20
20
  toPlain() {
21
- return (0, class_transformer_1.classToPlain)(this);
21
+ return (0, class_transformer_1.instanceToPlain)(this);
22
22
  }
23
23
  }
24
24
  exports.VehicleFinanceGetDTO = VehicleFinanceGetDTO;
@@ -30,11 +30,18 @@ class VehicleFinanceCreateDTO {
30
30
  static fromPlain(plain) {
31
31
  return (0, class_transformer_1.plainToClass)(VehicleFinanceCreateDTO, plain);
32
32
  }
33
+ toPlain() {
34
+ return (0, class_transformer_1.instanceToPlain)(this);
35
+ }
33
36
  }
34
37
  __decorate([
35
38
  (0, class_validator_1.IsString)(),
36
39
  __metadata("design:type", String)
37
40
  ], VehicleFinanceCreateDTO.prototype, "vehicleId", void 0);
41
+ __decorate([
42
+ (0, class_validator_1.IsNumber)(),
43
+ __metadata("design:type", Number)
44
+ ], VehicleFinanceCreateDTO.prototype, "price", void 0);
38
45
  __decorate([
39
46
  (0, class_validator_1.IsNumber)(),
40
47
  __metadata("design:type", Number)
@@ -52,29 +59,44 @@ __decorate([
52
59
  __metadata("design:type", Number)
53
60
  ], VehicleFinanceCreateDTO.prototype, "interestPerYear", void 0);
54
61
  __decorate([
62
+ (0, class_validator_1.IsOptional)(),
55
63
  (0, class_validator_1.IsNumber)(),
56
64
  __metadata("design:type", Number)
57
65
  ], VehicleFinanceCreateDTO.prototype, "totalReductionAmount", void 0);
58
66
  __decorate([
67
+ (0, class_validator_1.IsOptional)(),
59
68
  (0, class_validator_1.IsNumber)(),
60
69
  __metadata("design:type", Number)
61
70
  ], VehicleFinanceCreateDTO.prototype, "reductionDuration", void 0);
62
71
  __decorate([
72
+ (0, class_validator_1.IsOptional)(),
63
73
  (0, class_validator_1.IsString)(),
64
74
  __metadata("design:type", String)
65
75
  ], VehicleFinanceCreateDTO.prototype, "durationShow", void 0);
66
76
  __decorate([
77
+ (0, class_validator_1.IsOptional)(),
78
+ (0, class_validator_1.IsString)(),
79
+ __metadata("design:type", String)
80
+ ], VehicleFinanceCreateDTO.prototype, "vehiclePriceType", void 0);
81
+ __decorate([
82
+ (0, class_validator_1.IsOptional)(),
67
83
  (0, class_validator_1.IsNumber)(),
68
84
  __metadata("design:type", Number)
69
85
  ], VehicleFinanceCreateDTO.prototype, "reductionInterval", void 0);
70
86
  __decorate([
87
+ (0, class_validator_1.IsOptional)(),
71
88
  (0, class_validator_1.IsNumber)(),
72
89
  __metadata("design:type", Number)
73
90
  ], VehicleFinanceCreateDTO.prototype, "minimumBidAmount", void 0);
74
91
  __decorate([
92
+ (0, class_validator_1.IsOptional)(),
75
93
  (0, class_validator_1.IsNumber)(),
76
94
  __metadata("design:type", Number)
77
95
  ], VehicleFinanceCreateDTO.prototype, "initialDepositAmount", void 0);
96
+ __decorate([
97
+ (0, class_validator_1.IsString)(),
98
+ __metadata("design:type", String)
99
+ ], VehicleFinanceCreateDTO.prototype, "vatInclusive", void 0);
78
100
  exports.VehicleFinanceCreateDTO = VehicleFinanceCreateDTO;
79
101
  class VehicleFinanceUpdateDTO {
80
102
  validate() {
@@ -84,12 +106,20 @@ class VehicleFinanceUpdateDTO {
84
106
  static fromPlain(plain) {
85
107
  return (0, class_transformer_1.plainToClass)(VehicleFinanceUpdateDTO, plain);
86
108
  }
109
+ toPlain() {
110
+ return (0, class_transformer_1.instanceToPlain)(this);
111
+ }
87
112
  }
88
113
  __decorate([
89
114
  (0, class_validator_1.IsOptional)(),
90
115
  (0, class_validator_1.IsString)(),
91
116
  __metadata("design:type", String)
92
117
  ], VehicleFinanceUpdateDTO.prototype, "vehicleId", void 0);
118
+ __decorate([
119
+ (0, class_validator_1.IsOptional)(),
120
+ (0, class_validator_1.IsNumber)(),
121
+ __metadata("design:type", Number)
122
+ ], VehicleFinanceUpdateDTO.prototype, "price", void 0);
93
123
  __decorate([
94
124
  (0, class_validator_1.IsOptional)(),
95
125
  (0, class_validator_1.IsNumber)(),
@@ -140,4 +170,14 @@ __decorate([
140
170
  (0, class_validator_1.IsNumber)(),
141
171
  __metadata("design:type", Number)
142
172
  ], VehicleFinanceUpdateDTO.prototype, "initialDepositAmount", void 0);
173
+ __decorate([
174
+ (0, class_validator_1.IsOptional)(),
175
+ (0, class_validator_1.IsString)(),
176
+ __metadata("design:type", String)
177
+ ], VehicleFinanceUpdateDTO.prototype, "vehiclePriceType", void 0);
178
+ __decorate([
179
+ (0, class_validator_1.IsOptional)(),
180
+ (0, class_validator_1.IsString)(),
181
+ __metadata("design:type", String)
182
+ ], VehicleFinanceUpdateDTO.prototype, "vatInclusive", void 0);
143
183
  exports.VehicleFinanceUpdateDTO = VehicleFinanceUpdateDTO;
@@ -0,0 +1,147 @@
1
+ export declare enum InspectionStatus {
2
+ PERFECT = "Perfect",
3
+ IMPERFECTIONS = "Imperfections",
4
+ NOT_APPLICABLE = "Not Applicable"
5
+ }
6
+ export declare class InspectionPointDTO {
7
+ status: InspectionStatus;
8
+ imperfections?: string;
9
+ constructor(status?: InspectionStatus);
10
+ }
11
+ export declare abstract class BaseInspectionDTO {
12
+ validate(): string[];
13
+ static fromPlain<T>(this: new () => T, plain: Record<string, unknown>): T;
14
+ toPlain(): Record<string, unknown>;
15
+ }
16
+ export declare class ExteriorInspectionDTO extends BaseInspectionDTO {
17
+ frontLeftDoor: InspectionPointDTO;
18
+ frontRightDoor: InspectionPointDTO;
19
+ rearLeftDoor: InspectionPointDTO;
20
+ rearRightDoor: InspectionPointDTO;
21
+ leftFender: InspectionPointDTO;
22
+ rightFender: InspectionPointDTO;
23
+ frontBumper: InspectionPointDTO;
24
+ rearBumper: InspectionPointDTO;
25
+ hood: InspectionPointDTO;
26
+ trunk: InspectionPointDTO;
27
+ roof: InspectionPointDTO;
28
+ leftQuarterPanel: InspectionPointDTO;
29
+ rightQuarterPanel: InspectionPointDTO;
30
+ leftAPillar: InspectionPointDTO;
31
+ rightAPillar: InspectionPointDTO;
32
+ leftAtoBPillarBeading: InspectionPointDTO;
33
+ rightAtoBPillarBeading: InspectionPointDTO;
34
+ leftBPillarTrim: InspectionPointDTO;
35
+ rightBtoCPillarBeading: InspectionPointDTO;
36
+ leftRunningBoard: InspectionPointDTO;
37
+ rightRunningBoard: InspectionPointDTO;
38
+ frontWindshield: InspectionPointDTO;
39
+ rearWindshield: InspectionPointDTO;
40
+ chassisCondition: InspectionPointDTO;
41
+ apron: InspectionPointDTO;
42
+ bootFloor: InspectionPointDTO;
43
+ firewallCondition: InspectionPointDTO;
44
+ leftFrontAlloyRim: InspectionPointDTO;
45
+ leftRearAlloyRim: InspectionPointDTO;
46
+ rightFrontAlloyRim: InspectionPointDTO;
47
+ rightRearAlloyRim: InspectionPointDTO;
48
+ spareAlloyRimCondition: InspectionPointDTO;
49
+ wheelCover: InspectionPointDTO;
50
+ grillCondition: InspectionPointDTO;
51
+ windowGlass: InspectionPointDTO;
52
+ wiper: InspectionPointDTO;
53
+ panelCondition: InspectionPointDTO;
54
+ constructor();
55
+ }
56
+ export declare class TyresInspectionDTO extends BaseInspectionDTO {
57
+ leftFrontTyre: InspectionPointDTO;
58
+ leftFrontTyreLife: number;
59
+ rightFrontTyre: InspectionPointDTO;
60
+ rightFrontTyreLife: number;
61
+ leftRearTyre: InspectionPointDTO;
62
+ leftRearTyreLife: number;
63
+ rightRearTyre: InspectionPointDTO;
64
+ rightRearTyreLife: number;
65
+ spareTyre: InspectionPointDTO;
66
+ spareTyreLife: number;
67
+ constructor();
68
+ }
69
+ export declare class SteeringAndSuspensionInspectionDTO extends BaseInspectionDTO {
70
+ steeringWheel: InspectionPointDTO;
71
+ parkingBrake: InspectionPointDTO;
72
+ brakeMasterCylinder: InspectionPointDTO;
73
+ brakeDiscAndPad: InspectionPointDTO;
74
+ brakeFluid: InspectionPointDTO;
75
+ shockAbsorbers: InspectionPointDTO;
76
+ constructor();
77
+ }
78
+ export declare class InteriorInspectionDTO extends BaseInspectionDTO {
79
+ dashboard: InspectionPointDTO;
80
+ centralConsole: InspectionPointDTO;
81
+ gloveBox: InspectionPointDTO;
82
+ sunvisor: InspectionPointDTO;
83
+ seatUpholstery: InspectionPointDTO;
84
+ carpets: InspectionPointDTO;
85
+ headliner: InspectionPointDTO;
86
+ manualSeatMovement: InspectionPointDTO;
87
+ seatBelts: InspectionPointDTO;
88
+ headRest: InspectionPointDTO;
89
+ doorControls: InspectionPointDTO;
90
+ grabHandle: InspectionPointDTO;
91
+ rearViewMirror: InspectionPointDTO;
92
+ toolKit: InspectionPointDTO;
93
+ constructor();
94
+ }
95
+ export declare class EngineInspectionDTO extends BaseInspectionDTO {
96
+ engineBody: InspectionPointDTO;
97
+ enginePerformance: InspectionPointDTO;
98
+ engineOil: InspectionPointDTO;
99
+ exhaustSystem: InspectionPointDTO;
100
+ radiator: InspectionPointDTO;
101
+ coolant: InspectionPointDTO;
102
+ fuelTank: InspectionPointDTO;
103
+ gearShifting: InspectionPointDTO;
104
+ driveAxle: InspectionPointDTO;
105
+ transmissionFluid: InspectionPointDTO;
106
+ constructor();
107
+ }
108
+ export declare class ElectricalsInspectionDTO extends BaseInspectionDTO {
109
+ masterKey: InspectionPointDTO;
110
+ spareKey: InspectionPointDTO;
111
+ childSafetyLocking: InspectionPointDTO;
112
+ instrumentPanel: InspectionPointDTO;
113
+ airbags: InspectionPointDTO;
114
+ controls: InspectionPointDTO;
115
+ cruiseControl: InspectionPointDTO;
116
+ infotainmentDisplay: InspectionPointDTO;
117
+ obdConnector: InspectionPointDTO;
118
+ musicSystem: InspectionPointDTO;
119
+ headlight: InspectionPointDTO;
120
+ interiorLights: InspectionPointDTO;
121
+ tailLightCluster: InspectionPointDTO;
122
+ licensePlateLight: InspectionPointDTO;
123
+ acCooling: InspectionPointDTO;
124
+ acSwitch: InspectionPointDTO;
125
+ acLeaks: InspectionPointDTO;
126
+ centerAcVent: InspectionPointDTO;
127
+ frontRightAcVent: InspectionPointDTO;
128
+ heater: InspectionPointDTO;
129
+ parkingSensors: InspectionPointDTO;
130
+ rearDefogger: InspectionPointDTO;
131
+ usbChargingPort: InspectionPointDTO;
132
+ powerManualWindows: InspectionPointDTO;
133
+ constructor();
134
+ }
135
+ export declare class VehicleInspectionDTO {
136
+ vehicle: string;
137
+ inspectorId?: string;
138
+ exterior: ExteriorInspectionDTO;
139
+ steeringAndSuspension: SteeringAndSuspensionInspectionDTO;
140
+ interior: InteriorInspectionDTO;
141
+ engine: EngineInspectionDTO;
142
+ electricals: ElectricalsInspectionDTO;
143
+ tyres: TyresInspectionDTO;
144
+ validate(): string[];
145
+ static fromPlain(plain: Record<string, unknown>): VehicleInspectionDTO;
146
+ toPlain(): Record<string, unknown>;
147
+ }