@alba-cars/common-modules 2.0.0 → 2.1.0

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 (146) hide show
  1. package/dist/index.js +1 -21
  2. package/package.json +10 -6
  3. package/dist/core/enums/HttpMethods.js +0 -14
  4. package/dist/core/enums/HttpStatusCodes.js +0 -19
  5. package/dist/core/enums/index.js +0 -18
  6. package/dist/core/error-handling/AppError.js +0 -48
  7. package/dist/core/error-handling/index.js +0 -17
  8. package/dist/core/index.js +0 -21
  9. package/dist/core/models/index.js +0 -19
  10. package/dist/core/models/media/index.js +0 -17
  11. package/dist/core/models/media/media_data.js +0 -2
  12. package/dist/core/models/pagination/index.js +0 -17
  13. package/dist/core/models/pagination/paginated_data.js +0 -21
  14. package/dist/core/models/range.js +0 -26
  15. package/dist/core/network/api-client.d.ts +0 -1
  16. package/dist/core/network/api-client.js +0 -22
  17. package/dist/core/network/endpoint-config.js +0 -260
  18. package/dist/core/network/fetch-api.js +0 -206
  19. package/dist/core/network/index.js +0 -18
  20. package/dist/core/utils/formatCurrency.js +0 -39
  21. package/dist/core/utils/global-constants.js +0 -9
  22. package/dist/core/utils/global-utils.js +0 -190
  23. package/dist/core/utils/global_validators.js +0 -20
  24. package/dist/core/utils/index.js +0 -20
  25. package/dist/core/utils/query_flatten.js +0 -15
  26. package/dist/features/auth/data/dto/AuthDTO.js +0 -106
  27. package/dist/features/auth/data/dto/RoleDTO.js +0 -132
  28. package/dist/features/auth/data/dto/UserDTO.js +0 -222
  29. package/dist/features/auth/data/index.js +0 -19
  30. package/dist/features/auth/index.js +0 -17
  31. package/dist/features/bank-valuation-request/data/dto/BankValuationRequestDTO.js +0 -132
  32. package/dist/features/bank-valuation-request/index.js +0 -17
  33. package/dist/features/blog/data/dto/BlogDTO.js +0 -176
  34. package/dist/features/blog/index.js +0 -17
  35. package/dist/features/callback-request/data/dto/CallBackRequestDTO.js +0 -110
  36. package/dist/features/callback-request/index.js +0 -17
  37. package/dist/features/deposits/data/dto/DepositDTOs.js +0 -303
  38. package/dist/features/deposits/data/index.js +0 -17
  39. package/dist/features/deposits/index.js +0 -17
  40. package/dist/features/faq/data/dtos/CreateFaqDTO.js +0 -87
  41. package/dist/features/faq/data/dtos/FaqFetchDTO.js +0 -349
  42. package/dist/features/faq/data/dtos/UpdateFaqDTO.js +0 -91
  43. package/dist/features/faq/data/dtos/index.js +0 -19
  44. package/dist/features/faq/data/enums/index.js +0 -10
  45. package/dist/features/faq/data/index.js +0 -18
  46. package/dist/features/faq/index.js +0 -17
  47. package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.js +0 -429
  48. package/dist/features/finance-eligibilty-request/data/index.js +0 -17
  49. package/dist/features/finance-eligibilty-request/index.js +0 -17
  50. package/dist/features/google-review/data/dto/google_review_dto.js +0 -466
  51. package/dist/features/google-review/data/dto/index.js +0 -17
  52. package/dist/features/google-review/data/enums/index.js +0 -8
  53. package/dist/features/google-review/data/index.js +0 -18
  54. package/dist/features/google-review/index.js +0 -17
  55. package/dist/features/index.js +0 -34
  56. package/dist/features/lead/data/dto/index.js +0 -20
  57. package/dist/features/lead/data/dto/lead_documents_dto.js +0 -73
  58. package/dist/features/lead/data/dto/lead_dto.js +0 -435
  59. package/dist/features/lead/data/dto/lead_preference_history_dto.js +0 -321
  60. package/dist/features/lead/data/dto/lead_prefernce_dto.js +0 -308
  61. package/dist/features/lead/data/enum/index.js +0 -18
  62. package/dist/features/lead/data/enum/lead_source_status_types.js +0 -19
  63. package/dist/features/lead/data/enum/lead_status_type.js +0 -12
  64. package/dist/features/lead/index.js +0 -18
  65. package/dist/features/models/BankValuationRequest.js +0 -6
  66. package/dist/features/models/Base.js +0 -6
  67. package/dist/features/models/Deposit.js +0 -6
  68. package/dist/features/models/Lead.js +0 -6
  69. package/dist/features/models/Payment.js +0 -7
  70. package/dist/features/models/Roles.js +0 -2
  71. package/dist/features/models/Ticket.js +0 -12
  72. package/dist/features/models/User.js +0 -2
  73. package/dist/features/models/UserFavoriteVehicle.js +0 -6
  74. package/dist/features/models/Vehicle.js +0 -17
  75. package/dist/features/models/VehicleBodyType.js +0 -7
  76. package/dist/features/models/VehicleCategory.js +0 -7
  77. package/dist/features/models/VehicleFeature.js +0 -7
  78. package/dist/features/models/VehicleFeatureCategory.js +0 -7
  79. package/dist/features/models/VehicleFinance.js +0 -7
  80. package/dist/features/models/VehicleMake.js +0 -7
  81. package/dist/features/models/VehicleMedia.js +0 -7
  82. package/dist/features/models/VehicleMetaData.js +0 -7
  83. package/dist/features/models/VehicleModel.js +0 -7
  84. package/dist/features/models/VehicleOrder.js +0 -7
  85. package/dist/features/models/_index.js +0 -30
  86. package/dist/features/models/index.js +0 -37
  87. package/dist/features/newsletter/data/dto/NewsletterDTO.js +0 -79
  88. package/dist/features/newsletter/index.js +0 -17
  89. package/dist/features/sales-team/data/dto/LanguageDTO.js +0 -89
  90. package/dist/features/sales-team/data/dto/SalesAgentDTO.js +0 -613
  91. package/dist/features/sales-team/data/index.js +0 -18
  92. package/dist/features/sales-team/index.js +0 -17
  93. package/dist/features/sell-car-request/data/dto/SellCarRequestDTO.js +0 -672
  94. package/dist/features/sell-car-request/data/index.js +0 -17
  95. package/dist/features/sell-car-request/index.js +0 -17
  96. package/dist/features/showroom-visit/data/dto/ShowroomVisit.js +0 -237
  97. package/dist/features/showroom-visit/data/enums/index.js +0 -17
  98. package/dist/features/showroom-visit/data/index.js +0 -18
  99. package/dist/features/showroom-visit/index.js +0 -17
  100. package/dist/features/test-drive-request/api/GetTestDriveVehicles.js +0 -8
  101. package/dist/features/test-drive-request/api/index.js +0 -17
  102. package/dist/features/test-drive-request/data/dto/TestDriveRequestDTO.js +0 -179
  103. package/dist/features/test-drive-request/data/enums/index.js +0 -29
  104. package/dist/features/test-drive-request/data/index.js +0 -20
  105. package/dist/features/test-drive-request/data/models/TestDriveRequest.js +0 -7
  106. package/dist/features/test-drive-request/data/models/index.js +0 -5
  107. package/dist/features/test-drive-request/data/utilities.js +0 -100
  108. package/dist/features/test-drive-request/index.js +0 -18
  109. package/dist/features/tickets/data/dto/TicketDto.js +0 -293
  110. package/dist/features/tickets/data/enums/index.js +0 -18
  111. package/dist/features/tickets/index.js +0 -18
  112. package/dist/features/vehicle/data/dto/BaseDTO.js +0 -34
  113. package/dist/features/vehicle/data/dto/MediaDTO.js +0 -2
  114. package/dist/features/vehicle/data/dto/PaymentDTO.js +0 -161
  115. package/dist/features/vehicle/data/dto/SimilarVehicleDTO.js +0 -38
  116. package/dist/features/vehicle/data/dto/VehicleCategoryDTO.js +0 -114
  117. package/dist/features/vehicle/data/dto/VehicleDTO.js +0 -587
  118. package/dist/features/vehicle/data/dto/VehicleFavoritesDTO.js +0 -60
  119. package/dist/features/vehicle/data/dto/VehicleFeatureCategoriesDTO.js +0 -114
  120. package/dist/features/vehicle/data/dto/VehicleFeatureDTO.js +0 -125
  121. package/dist/features/vehicle/data/dto/VehicleFilterDTO.js +0 -771
  122. package/dist/features/vehicle/data/dto/VehicleFinanceDTO.js +0 -183
  123. package/dist/features/vehicle/data/dto/VehicleInspectionDTO.js +0 -765
  124. package/dist/features/vehicle/data/dto/VehicleMakeDTO.js +0 -189
  125. package/dist/features/vehicle/data/dto/VehicleMedia.js +0 -152
  126. package/dist/features/vehicle/data/dto/VehicleModelDTO.js +0 -182
  127. package/dist/features/vehicle/data/dto/VehicleOrderDTO.js +0 -139
  128. package/dist/features/vehicle/data/dto/VehicleTypeDTO.js +0 -102
  129. package/dist/features/vehicle/data/dto/VehicleWarrantyDTO.js +0 -47
  130. package/dist/features/vehicle/data/dto/index.js +0 -35
  131. package/dist/features/vehicle/data/enums/index.js +0 -46
  132. package/dist/features/vehicle/data/index.js +0 -20
  133. package/dist/features/vehicle/data/utilities.js +0 -520
  134. package/dist/features/vehicle/index.js +0 -17
  135. package/dist/features/vehicle-reservations/data/dto/VehicleReservationDTO.js +0 -346
  136. package/dist/features/vehicle-reservations/data/dto/index.js +0 -17
  137. package/dist/features/vehicle-reservations/data/enums/finance-type.js +0 -9
  138. package/dist/features/vehicle-reservations/data/enums/index.js +0 -19
  139. package/dist/features/vehicle-reservations/data/enums/reservation-type.js +0 -13
  140. package/dist/features/vehicle-reservations/data/enums/vehicle-reservation-type.js +0 -8
  141. package/dist/features/vehicle-reservations/index.js +0 -18
  142. package/dist/global/dto/BaseGetDTO.js +0 -18
  143. package/dist/global/dto/index.js +0 -17
  144. package/dist/global/index.js +0 -18
  145. package/dist/global/utilities.js +0 -173
  146. package/dist/models.js +0 -17
@@ -1,672 +0,0 @@
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.SellCarFetchDTO = exports.SellCarOptionsDTO = exports.SellCarFilterDTO = exports.SellCarRequestResponseDTO = exports.SellCarRequestUpdateDTO = exports.ExchangeCarRequestCreateDTO = exports.SellCarRequestCreateDTO = exports.SellCarRequestDTO = exports.VehicleOption = exports.TradeInOption = exports.RequestType = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const class_transformer_1 = require("class-transformer");
15
- const class_transformer_2 = require("class-transformer");
16
- const global_1 = require("../../../../global");
17
- const vehicle_1 = require("../../../vehicle");
18
- var RequestType;
19
- (function (RequestType) {
20
- RequestType["SELL"] = "sell";
21
- RequestType["TRADE_IN"] = "trade_in";
22
- })(RequestType = exports.RequestType || (exports.RequestType = {}));
23
- var TradeInOption;
24
- (function (TradeInOption) {
25
- TradeInOption["YES"] = "yes";
26
- TradeInOption["NO"] = "no";
27
- })(TradeInOption = exports.TradeInOption || (exports.TradeInOption = {}));
28
- var VehicleOption;
29
- (function (VehicleOption) {
30
- VehicleOption["NEW"] = "new";
31
- VehicleOption["USED"] = "used";
32
- })(VehicleOption = exports.VehicleOption || (exports.VehicleOption = {}));
33
- class SellCarRequestDTO {
34
- validate() {
35
- const errors = (0, class_validator_1.validateSync)(this);
36
- return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
37
- }
38
- static fromPlain(plain) {
39
- return (0, class_transformer_1.plainToClass)(SellCarRequestDTO, plain);
40
- }
41
- toPlain() {
42
- return (0, class_transformer_1.classToPlain)(this);
43
- }
44
- }
45
- __decorate([
46
- (0, class_validator_1.IsUUID)(),
47
- __metadata("design:type", String)
48
- ], SellCarRequestDTO.prototype, "id", void 0);
49
- __decorate([
50
- (0, class_validator_1.IsString)(),
51
- __metadata("design:type", String)
52
- ], SellCarRequestDTO.prototype, "name", void 0);
53
- __decorate([
54
- (0, class_validator_1.IsString)(),
55
- (0, class_validator_1.IsPhoneNumber)(),
56
- __metadata("design:type", String)
57
- ], SellCarRequestDTO.prototype, "phone", void 0);
58
- __decorate([
59
- (0, class_validator_1.IsString)(),
60
- __metadata("design:type", String)
61
- ], SellCarRequestDTO.prototype, "brand", void 0);
62
- __decorate([
63
- (0, class_validator_1.IsString)(),
64
- __metadata("design:type", String)
65
- ], SellCarRequestDTO.prototype, "brandName", void 0);
66
- __decorate([
67
- (0, class_validator_1.IsString)(),
68
- __metadata("design:type", String)
69
- ], SellCarRequestDTO.prototype, "model", void 0);
70
- __decorate([
71
- (0, class_validator_1.IsString)(),
72
- __metadata("design:type", String)
73
- ], SellCarRequestDTO.prototype, "modelName", void 0);
74
- __decorate([
75
- (0, class_validator_1.IsString)(),
76
- __metadata("design:type", String)
77
- ], SellCarRequestDTO.prototype, "modelVersion", void 0);
78
- __decorate([
79
- (0, class_validator_1.IsString)(),
80
- __metadata("design:type", String)
81
- ], SellCarRequestDTO.prototype, "modelVersionName", void 0);
82
- __decorate([
83
- (0, class_validator_1.IsString)(),
84
- __metadata("design:type", String)
85
- ], SellCarRequestDTO.prototype, "year", void 0);
86
- __decorate([
87
- (0, class_validator_1.IsNumber)(),
88
- __metadata("design:type", Number)
89
- ], SellCarRequestDTO.prototype, "mileage", void 0);
90
- __decorate([
91
- (0, class_validator_1.IsString)(),
92
- (0, class_validator_1.IsOptional)(),
93
- __metadata("design:type", String)
94
- ], SellCarRequestDTO.prototype, "description", void 0);
95
- __decorate([
96
- (0, class_validator_1.IsString)(),
97
- __metadata("design:type", String)
98
- ], SellCarRequestDTO.prototype, "specification", void 0);
99
- __decorate([
100
- (0, class_validator_1.IsString)(),
101
- __metadata("design:type", String)
102
- ], SellCarRequestDTO.prototype, "specificationName", void 0);
103
- __decorate([
104
- (0, class_validator_1.IsEnum)(TradeInOption),
105
- __metadata("design:type", String)
106
- ], SellCarRequestDTO.prototype, "tradeIn", void 0);
107
- __decorate([
108
- (0, class_validator_1.IsArray)(),
109
- (0, class_validator_1.IsString)({ each: true }),
110
- __metadata("design:type", Array)
111
- ], SellCarRequestDTO.prototype, "images", void 0);
112
- __decorate([
113
- (0, class_validator_1.IsBoolean)(),
114
- (0, class_validator_1.IsOptional)(),
115
- __metadata("design:type", Boolean)
116
- ], SellCarRequestDTO.prototype, "isDeleted", void 0);
117
- __decorate([
118
- (0, class_validator_1.IsDate)(),
119
- (0, class_validator_1.IsOptional)(),
120
- __metadata("design:type", Date)
121
- ], SellCarRequestDTO.prototype, "createdAt", void 0);
122
- __decorate([
123
- (0, class_validator_1.IsDate)(),
124
- (0, class_validator_1.IsOptional)(),
125
- __metadata("design:type", Date)
126
- ], SellCarRequestDTO.prototype, "updatedAt", void 0);
127
- exports.SellCarRequestDTO = SellCarRequestDTO;
128
- class SellCarRequestCreateDTO {
129
- validate() {
130
- const errors = (0, class_validator_1.validateSync)(this);
131
- return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
132
- }
133
- static fromPlain(plain) {
134
- return (0, class_transformer_1.plainToClass)(SellCarRequestCreateDTO, plain);
135
- }
136
- toPlain() {
137
- return (0, class_transformer_1.classToPlain)(this);
138
- }
139
- }
140
- __decorate([
141
- (0, class_validator_1.IsString)(),
142
- (0, class_validator_1.IsNotEmpty)(),
143
- __metadata("design:type", String)
144
- ], SellCarRequestCreateDTO.prototype, "name", void 0);
145
- __decorate([
146
- (0, class_validator_1.IsString)(),
147
- (0, class_validator_1.IsPhoneNumber)(),
148
- __metadata("design:type", String)
149
- ], SellCarRequestCreateDTO.prototype, "phone", void 0);
150
- __decorate([
151
- (0, class_validator_1.IsString)(),
152
- __metadata("design:type", String)
153
- ], SellCarRequestCreateDTO.prototype, "brand", void 0);
154
- __decorate([
155
- (0, class_validator_1.IsString)(),
156
- __metadata("design:type", String)
157
- ], SellCarRequestCreateDTO.prototype, "brandName", void 0);
158
- __decorate([
159
- (0, class_validator_1.IsString)(),
160
- __metadata("design:type", String)
161
- ], SellCarRequestCreateDTO.prototype, "model", void 0);
162
- __decorate([
163
- (0, class_validator_1.IsString)(),
164
- __metadata("design:type", String)
165
- ], SellCarRequestCreateDTO.prototype, "modelName", void 0);
166
- __decorate([
167
- (0, class_validator_1.IsString)(),
168
- (0, class_validator_1.IsOptional)(),
169
- __metadata("design:type", String)
170
- ], SellCarRequestCreateDTO.prototype, "modelVersion", void 0);
171
- __decorate([
172
- (0, class_validator_1.IsString)(),
173
- (0, class_validator_1.IsOptional)(),
174
- __metadata("design:type", String)
175
- ], SellCarRequestCreateDTO.prototype, "modelVersionName", void 0);
176
- __decorate([
177
- (0, class_validator_1.IsString)(),
178
- __metadata("design:type", String)
179
- ], SellCarRequestCreateDTO.prototype, "year", void 0);
180
- __decorate([
181
- (0, class_validator_1.IsNumber)(),
182
- __metadata("design:type", Number)
183
- ], SellCarRequestCreateDTO.prototype, "mileage", void 0);
184
- __decorate([
185
- (0, class_validator_1.IsNumber)(),
186
- (0, class_validator_1.IsOptional)(),
187
- __metadata("design:type", Number)
188
- ], SellCarRequestCreateDTO.prototype, "expectedSellingPrice", void 0);
189
- __decorate([
190
- (0, class_validator_1.IsString)(),
191
- (0, class_validator_1.IsOptional)(),
192
- __metadata("design:type", String)
193
- ], SellCarRequestCreateDTO.prototype, "description", void 0);
194
- __decorate([
195
- (0, class_validator_1.IsString)(),
196
- (0, class_validator_1.IsOptional)(),
197
- __metadata("design:type", String)
198
- ], SellCarRequestCreateDTO.prototype, "emirates", void 0);
199
- __decorate([
200
- (0, class_validator_1.IsString)(),
201
- (0, class_validator_1.IsOptional)(),
202
- __metadata("design:type", String)
203
- ], SellCarRequestCreateDTO.prototype, "specification", void 0);
204
- __decorate([
205
- (0, class_validator_1.IsString)(),
206
- __metadata("design:type", String)
207
- ], SellCarRequestCreateDTO.prototype, "specificationName", void 0);
208
- __decorate([
209
- (0, class_validator_1.IsEnum)(RequestType),
210
- (0, class_validator_1.IsOptional)(),
211
- __metadata("design:type", String)
212
- ], SellCarRequestCreateDTO.prototype, "requestType", void 0);
213
- __decorate([
214
- (0, class_validator_1.IsEnum)(TradeInOption),
215
- __metadata("design:type", String)
216
- ], SellCarRequestCreateDTO.prototype, "tradeIn", void 0);
217
- __decorate([
218
- (0, class_validator_1.IsString)(),
219
- (0, class_validator_1.IsOptional)(),
220
- __metadata("design:type", String)
221
- ], SellCarRequestCreateDTO.prototype, "additionalDetails", void 0);
222
- __decorate([
223
- (0, class_validator_1.IsNumber)(),
224
- (0, class_validator_1.IsOptional)(),
225
- __metadata("design:type", Number)
226
- ], SellCarRequestCreateDTO.prototype, "dealDriveEstimation", void 0);
227
- __decorate([
228
- (0, class_validator_1.IsArray)(),
229
- (0, class_validator_1.IsString)({ each: true }),
230
- __metadata("design:type", Array)
231
- ], SellCarRequestCreateDTO.prototype, "images", void 0);
232
- __decorate([
233
- (0, class_validator_1.ValidateNested)({ each: true }),
234
- (0, class_transformer_2.Type)(() => vehicle_1.VehicleMediaCreateDTO),
235
- (0, class_validator_1.IsOptional)(),
236
- __metadata("design:type", Array)
237
- ], SellCarRequestCreateDTO.prototype, "media", void 0);
238
- __decorate([
239
- (0, class_validator_1.IsOptional)(),
240
- (0, class_validator_1.IsDateString)(),
241
- __metadata("design:type", Date)
242
- ], SellCarRequestCreateDTO.prototype, "inspectionBookingDate", void 0);
243
- exports.SellCarRequestCreateDTO = SellCarRequestCreateDTO;
244
- class ExchangeCarRequestCreateDTO {
245
- validate() {
246
- const errors = (0, class_validator_1.validateSync)(this);
247
- return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
248
- }
249
- static fromPlain(plain) {
250
- return (0, class_transformer_1.plainToClass)(SellCarRequestCreateDTO, plain);
251
- }
252
- toPlain() {
253
- return (0, class_transformer_1.classToPlain)(this);
254
- }
255
- }
256
- __decorate([
257
- (0, class_validator_1.IsString)(),
258
- (0, class_validator_1.IsNotEmpty)(),
259
- __metadata("design:type", String)
260
- ], ExchangeCarRequestCreateDTO.prototype, "name", void 0);
261
- __decorate([
262
- (0, class_validator_1.IsString)(),
263
- (0, class_validator_1.IsPhoneNumber)(),
264
- __metadata("design:type", String)
265
- ], ExchangeCarRequestCreateDTO.prototype, "phone", void 0);
266
- __decorate([
267
- (0, class_validator_1.IsString)(),
268
- __metadata("design:type", String)
269
- ], ExchangeCarRequestCreateDTO.prototype, "brand", void 0);
270
- __decorate([
271
- (0, class_validator_1.IsString)(),
272
- __metadata("design:type", String)
273
- ], ExchangeCarRequestCreateDTO.prototype, "brandName", void 0);
274
- __decorate([
275
- (0, class_validator_1.IsString)(),
276
- __metadata("design:type", String)
277
- ], ExchangeCarRequestCreateDTO.prototype, "model", void 0);
278
- __decorate([
279
- (0, class_validator_1.IsString)(),
280
- __metadata("design:type", String)
281
- ], ExchangeCarRequestCreateDTO.prototype, "modelName", void 0);
282
- __decorate([
283
- (0, class_validator_1.IsString)(),
284
- (0, class_validator_1.IsOptional)(),
285
- __metadata("design:type", String)
286
- ], ExchangeCarRequestCreateDTO.prototype, "modelVersion", void 0);
287
- __decorate([
288
- (0, class_validator_1.IsString)(),
289
- (0, class_validator_1.IsOptional)(),
290
- __metadata("design:type", String)
291
- ], ExchangeCarRequestCreateDTO.prototype, "modelVersionName", void 0);
292
- __decorate([
293
- (0, class_validator_1.IsString)(),
294
- __metadata("design:type", String)
295
- ], ExchangeCarRequestCreateDTO.prototype, "year", void 0);
296
- __decorate([
297
- (0, class_validator_1.IsNumber)(),
298
- __metadata("design:type", Number)
299
- ], ExchangeCarRequestCreateDTO.prototype, "mileage", void 0);
300
- __decorate([
301
- (0, class_validator_1.IsNumber)(),
302
- (0, class_validator_1.IsOptional)(),
303
- __metadata("design:type", Number)
304
- ], ExchangeCarRequestCreateDTO.prototype, "expectedSellingPrice", void 0);
305
- __decorate([
306
- (0, class_validator_1.IsString)(),
307
- (0, class_validator_1.IsOptional)(),
308
- __metadata("design:type", String)
309
- ], ExchangeCarRequestCreateDTO.prototype, "description", void 0);
310
- __decorate([
311
- (0, class_validator_1.IsString)(),
312
- (0, class_validator_1.IsOptional)(),
313
- __metadata("design:type", String)
314
- ], ExchangeCarRequestCreateDTO.prototype, "emirates", void 0);
315
- __decorate([
316
- (0, class_validator_1.IsString)(),
317
- (0, class_validator_1.IsOptional)(),
318
- __metadata("design:type", String)
319
- ], ExchangeCarRequestCreateDTO.prototype, "specification", void 0);
320
- __decorate([
321
- (0, class_validator_1.IsString)(),
322
- __metadata("design:type", String)
323
- ], ExchangeCarRequestCreateDTO.prototype, "specificationName", void 0);
324
- __decorate([
325
- (0, class_validator_1.IsEnum)(RequestType),
326
- (0, class_validator_1.IsOptional)(),
327
- __metadata("design:type", String)
328
- ], ExchangeCarRequestCreateDTO.prototype, "requestType", void 0);
329
- __decorate([
330
- (0, class_validator_1.IsEnum)(TradeInOption),
331
- __metadata("design:type", String)
332
- ], ExchangeCarRequestCreateDTO.prototype, "tradeIn", void 0);
333
- __decorate([
334
- (0, class_validator_1.IsString)(),
335
- (0, class_validator_1.IsOptional)(),
336
- __metadata("design:type", String)
337
- ], ExchangeCarRequestCreateDTO.prototype, "additionalDetails", void 0);
338
- __decorate([
339
- (0, class_validator_1.IsNumber)(),
340
- (0, class_validator_1.IsOptional)(),
341
- __metadata("design:type", Number)
342
- ], ExchangeCarRequestCreateDTO.prototype, "dealDriveEstimation", void 0);
343
- __decorate([
344
- (0, class_validator_1.IsArray)(),
345
- (0, class_validator_1.IsString)({ each: true }),
346
- __metadata("design:type", Array)
347
- ], ExchangeCarRequestCreateDTO.prototype, "images", void 0);
348
- __decorate([
349
- (0, class_validator_1.ValidateNested)({ each: true }),
350
- (0, class_transformer_2.Type)(() => vehicle_1.VehicleMediaCreateDTO),
351
- (0, class_validator_1.IsOptional)(),
352
- __metadata("design:type", Array)
353
- ], ExchangeCarRequestCreateDTO.prototype, "media", void 0);
354
- __decorate([
355
- (0, class_validator_1.IsOptional)(),
356
- (0, class_validator_1.IsDateString)(),
357
- __metadata("design:type", Date)
358
- ], ExchangeCarRequestCreateDTO.prototype, "bookingDate", void 0);
359
- exports.ExchangeCarRequestCreateDTO = ExchangeCarRequestCreateDTO;
360
- class SellCarRequestUpdateDTO {
361
- validate() {
362
- const errors = (0, class_validator_1.validateSync)(this);
363
- return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
364
- }
365
- static fromPlain(plain) {
366
- return (0, class_transformer_1.plainToClass)(SellCarRequestUpdateDTO, plain);
367
- }
368
- toPlain() {
369
- return (0, class_transformer_1.classToPlain)(this);
370
- }
371
- }
372
- __decorate([
373
- (0, class_validator_1.IsOptional)(),
374
- (0, class_validator_1.IsString)(),
375
- __metadata("design:type", String)
376
- ], SellCarRequestUpdateDTO.prototype, "name", void 0);
377
- __decorate([
378
- (0, class_validator_1.IsOptional)(),
379
- (0, class_validator_1.IsPhoneNumber)(),
380
- __metadata("design:type", String)
381
- ], SellCarRequestUpdateDTO.prototype, "phone", void 0);
382
- __decorate([
383
- (0, class_validator_1.IsOptional)(),
384
- (0, class_validator_1.IsEmail)(),
385
- __metadata("design:type", String)
386
- ], SellCarRequestUpdateDTO.prototype, "email", void 0);
387
- __decorate([
388
- (0, class_validator_1.IsOptional)(),
389
- (0, class_validator_1.IsString)(),
390
- __metadata("design:type", String)
391
- ], SellCarRequestUpdateDTO.prototype, "city", void 0);
392
- __decorate([
393
- (0, class_validator_1.IsOptional)(),
394
- (0, class_validator_1.IsEnum)(RequestType),
395
- __metadata("design:type", String)
396
- ], SellCarRequestUpdateDTO.prototype, "requestType", void 0);
397
- __decorate([
398
- (0, class_validator_1.IsOptional)(),
399
- (0, class_validator_1.IsUUID)(),
400
- __metadata("design:type", String)
401
- ], SellCarRequestUpdateDTO.prototype, "makeId", void 0);
402
- __decorate([
403
- (0, class_validator_1.IsOptional)(),
404
- (0, class_validator_1.IsUUID)(),
405
- __metadata("design:type", String)
406
- ], SellCarRequestUpdateDTO.prototype, "modelId", void 0);
407
- __decorate([
408
- (0, class_validator_1.IsOptional)(),
409
- (0, class_validator_1.IsNumber)(),
410
- (0, class_validator_1.IsPositive)(),
411
- __metadata("design:type", Number)
412
- ], SellCarRequestUpdateDTO.prototype, "year", void 0);
413
- __decorate([
414
- (0, class_validator_1.IsOptional)(),
415
- (0, class_validator_1.IsNumber)(),
416
- (0, class_validator_1.IsPositive)(),
417
- __metadata("design:type", Number)
418
- ], SellCarRequestUpdateDTO.prototype, "mileage", void 0);
419
- __decorate([
420
- (0, class_validator_1.IsOptional)(),
421
- (0, class_validator_1.IsString)(),
422
- __metadata("design:type", String)
423
- ], SellCarRequestUpdateDTO.prototype, "specification", void 0);
424
- __decorate([
425
- (0, class_validator_1.IsOptional)(),
426
- (0, class_validator_1.IsArray)(),
427
- (0, class_validator_1.IsString)({ each: true }),
428
- __metadata("design:type", Array)
429
- ], SellCarRequestUpdateDTO.prototype, "images", void 0);
430
- __decorate([
431
- (0, class_validator_1.IsOptional)(),
432
- (0, class_validator_1.IsUUID)(),
433
- __metadata("design:type", String)
434
- ], SellCarRequestUpdateDTO.prototype, "desiredVehicleId", void 0);
435
- __decorate([
436
- (0, class_validator_1.IsOptional)(),
437
- (0, class_validator_1.IsString)(),
438
- __metadata("design:type", String)
439
- ], SellCarRequestUpdateDTO.prototype, "color", void 0);
440
- __decorate([
441
- (0, class_validator_1.IsOptional)(),
442
- (0, class_validator_1.IsString)(),
443
- __metadata("design:type", String)
444
- ], SellCarRequestUpdateDTO.prototype, "transmission", void 0);
445
- __decorate([
446
- (0, class_validator_1.IsOptional)(),
447
- (0, class_validator_1.IsString)(),
448
- __metadata("design:type", String)
449
- ], SellCarRequestUpdateDTO.prototype, "fuelType", void 0);
450
- __decorate([
451
- (0, class_validator_1.IsOptional)(),
452
- (0, class_validator_1.IsString)(),
453
- __metadata("design:type", String)
454
- ], SellCarRequestUpdateDTO.prototype, "engineCapacity", void 0);
455
- __decorate([
456
- (0, class_validator_1.IsOptional)(),
457
- (0, class_validator_1.IsString)(),
458
- __metadata("design:type", String)
459
- ], SellCarRequestUpdateDTO.prototype, "description", void 0);
460
- __decorate([
461
- (0, class_validator_1.IsOptional)(),
462
- (0, class_validator_1.IsEnum)([
463
- "pending",
464
- "inspection_scheduled",
465
- "inspected",
466
- "valued",
467
- "approved",
468
- "rejected",
469
- "completed",
470
- ]),
471
- __metadata("design:type", String)
472
- ], SellCarRequestUpdateDTO.prototype, "status", void 0);
473
- __decorate([
474
- (0, class_validator_1.IsOptional)(),
475
- __metadata("design:type", Object)
476
- ], SellCarRequestUpdateDTO.prototype, "additionalDetails", void 0);
477
- exports.SellCarRequestUpdateDTO = SellCarRequestUpdateDTO;
478
- class SellCarRequestResponseDTO {
479
- validate() {
480
- const errors = (0, class_validator_1.validateSync)(this);
481
- return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
482
- }
483
- static fromPlain(plain) {
484
- return (0, class_transformer_1.plainToClass)(SellCarRequestResponseDTO, plain);
485
- }
486
- toPlain() {
487
- return (0, class_transformer_1.classToPlain)(this);
488
- }
489
- }
490
- __decorate([
491
- (0, class_validator_1.IsString)(),
492
- __metadata("design:type", String)
493
- ], SellCarRequestResponseDTO.prototype, "id", void 0);
494
- __decorate([
495
- (0, class_validator_1.IsNumber)(),
496
- __metadata("design:type", Number)
497
- ], SellCarRequestResponseDTO.prototype, "refId", void 0);
498
- __decorate([
499
- (0, class_validator_1.IsString)(),
500
- (0, class_validator_1.IsNotEmpty)(),
501
- __metadata("design:type", String)
502
- ], SellCarRequestResponseDTO.prototype, "name", void 0);
503
- __decorate([
504
- (0, class_validator_1.IsString)(),
505
- (0, class_validator_1.IsPhoneNumber)(),
506
- __metadata("design:type", String)
507
- ], SellCarRequestResponseDTO.prototype, "phone", void 0);
508
- __decorate([
509
- (0, class_validator_1.IsString)(),
510
- __metadata("design:type", String)
511
- ], SellCarRequestResponseDTO.prototype, "brand", void 0);
512
- __decorate([
513
- (0, class_validator_1.IsString)(),
514
- __metadata("design:type", String)
515
- ], SellCarRequestResponseDTO.prototype, "brandName", void 0);
516
- __decorate([
517
- (0, class_validator_1.IsString)(),
518
- __metadata("design:type", String)
519
- ], SellCarRequestResponseDTO.prototype, "model", void 0);
520
- __decorate([
521
- (0, class_validator_1.IsString)(),
522
- __metadata("design:type", String)
523
- ], SellCarRequestResponseDTO.prototype, "modelName", void 0);
524
- __decorate([
525
- (0, class_validator_1.IsString)(),
526
- __metadata("design:type", String)
527
- ], SellCarRequestResponseDTO.prototype, "modelVersion", void 0);
528
- __decorate([
529
- (0, class_validator_1.IsString)(),
530
- __metadata("design:type", String)
531
- ], SellCarRequestResponseDTO.prototype, "modelVersionName", void 0);
532
- __decorate([
533
- (0, class_validator_1.IsString)(),
534
- __metadata("design:type", String)
535
- ], SellCarRequestResponseDTO.prototype, "year", void 0);
536
- __decorate([
537
- (0, class_validator_1.IsNumber)(),
538
- __metadata("design:type", Number)
539
- ], SellCarRequestResponseDTO.prototype, "mileage", void 0);
540
- __decorate([
541
- (0, class_validator_1.IsNumber)(),
542
- __metadata("design:type", Number)
543
- ], SellCarRequestResponseDTO.prototype, "expectedSellingPrice", void 0);
544
- __decorate([
545
- (0, class_validator_1.IsString)(),
546
- __metadata("design:type", String)
547
- ], SellCarRequestResponseDTO.prototype, "description", void 0);
548
- __decorate([
549
- (0, class_validator_1.IsString)(),
550
- __metadata("design:type", String)
551
- ], SellCarRequestResponseDTO.prototype, "specification", void 0);
552
- __decorate([
553
- (0, class_validator_1.IsString)(),
554
- __metadata("design:type", String)
555
- ], SellCarRequestResponseDTO.prototype, "specificationName", void 0);
556
- __decorate([
557
- (0, class_validator_1.IsEnum)(RequestType),
558
- (0, class_validator_1.IsOptional)(),
559
- __metadata("design:type", String)
560
- ], SellCarRequestResponseDTO.prototype, "requestType", void 0);
561
- __decorate([
562
- (0, class_validator_1.IsEnum)(TradeInOption),
563
- __metadata("design:type", String)
564
- ], SellCarRequestResponseDTO.prototype, "tradeIn", void 0);
565
- __decorate([
566
- (0, class_validator_1.IsNumber)(),
567
- (0, class_validator_1.IsOptional)(),
568
- __metadata("design:type", Number)
569
- ], SellCarRequestResponseDTO.prototype, "dealDriveEstimation", void 0);
570
- __decorate([
571
- (0, class_validator_1.IsString)(),
572
- (0, class_validator_1.IsOptional)(),
573
- __metadata("design:type", String)
574
- ], SellCarRequestResponseDTO.prototype, "additionalDetails", void 0);
575
- __decorate([
576
- (0, class_validator_1.IsBoolean)(),
577
- __metadata("design:type", Boolean)
578
- ], SellCarRequestResponseDTO.prototype, "isDeleted", void 0);
579
- __decorate([
580
- (0, class_validator_1.IsBoolean)(),
581
- __metadata("design:type", Boolean)
582
- ], SellCarRequestResponseDTO.prototype, "isActive", void 0);
583
- __decorate([
584
- (0, class_validator_1.IsArray)(),
585
- (0, class_validator_1.IsString)({ each: true }),
586
- __metadata("design:type", Array)
587
- ], SellCarRequestResponseDTO.prototype, "images", void 0);
588
- __decorate([
589
- (0, class_validator_1.ValidateNested)({ each: true }),
590
- (0, class_transformer_2.Type)(() => vehicle_1.VehicleMediaCreateDTO),
591
- (0, class_validator_1.IsOptional)(),
592
- __metadata("design:type", Array)
593
- ], SellCarRequestResponseDTO.prototype, "media", void 0);
594
- __decorate([
595
- (0, class_validator_1.IsString)(),
596
- (0, class_validator_1.IsOptional)(),
597
- __metadata("design:type", Object)
598
- ], SellCarRequestResponseDTO.prototype, "createdById", void 0);
599
- __decorate([
600
- (0, class_validator_1.IsString)(),
601
- (0, class_validator_1.IsOptional)(),
602
- __metadata("design:type", Object)
603
- ], SellCarRequestResponseDTO.prototype, "updatedById", void 0);
604
- __decorate([
605
- (0, class_validator_1.IsString)(),
606
- (0, class_validator_1.IsOptional)(),
607
- __metadata("design:type", Object)
608
- ], SellCarRequestResponseDTO.prototype, "deletedById", void 0);
609
- exports.SellCarRequestResponseDTO = SellCarRequestResponseDTO;
610
- class SellCarFilterDTO {
611
- validate() {
612
- const errors = (0, class_validator_1.validateSync)(this);
613
- return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
614
- }
615
- static fromPlain(plain) {
616
- return (0, class_transformer_1.plainToClass)(SellCarFilterDTO, plain);
617
- }
618
- toPlain() {
619
- return (0, class_transformer_1.classToPlain)(this);
620
- }
621
- }
622
- __decorate([
623
- (0, class_validator_1.IsOptional)(),
624
- __metadata("design:type", String)
625
- ], SellCarFilterDTO.prototype, "search", void 0);
626
- __decorate([
627
- (0, class_validator_1.IsUUID)(),
628
- (0, class_validator_1.IsOptional)(),
629
- __metadata("design:type", String)
630
- ], SellCarFilterDTO.prototype, "leadId", void 0);
631
- __decorate([
632
- (0, class_validator_1.IsBoolean)(),
633
- (0, class_validator_1.IsOptional)(),
634
- __metadata("design:type", Boolean)
635
- ], SellCarFilterDTO.prototype, "isActive", void 0);
636
- __decorate([
637
- (0, class_validator_1.IsObject)(),
638
- (0, class_validator_1.IsOptional)(),
639
- __metadata("design:type", global_1.DateFilter)
640
- ], SellCarFilterDTO.prototype, "createdAt", void 0);
641
- __decorate([
642
- (0, class_validator_1.IsEnum)(TradeInOption),
643
- (0, class_validator_1.IsOptional)(),
644
- __metadata("design:type", String)
645
- ], SellCarFilterDTO.prototype, "tradeIn", void 0);
646
- exports.SellCarFilterDTO = SellCarFilterDTO;
647
- class SellCarOptionsDTO extends global_1.PaginationOptions {
648
- static fromPlain(plain) {
649
- return (0, class_transformer_1.plainToClass)(SellCarOptionsDTO, plain);
650
- }
651
- toPlain() {
652
- return (0, class_transformer_1.classToPlain)(this);
653
- }
654
- }
655
- __decorate([
656
- (0, class_validator_1.IsOptional)(),
657
- __metadata("design:type", Object)
658
- ], SellCarOptionsDTO.prototype, "sort", void 0);
659
- exports.SellCarOptionsDTO = SellCarOptionsDTO;
660
- class SellCarFetchDTO {
661
- validate() {
662
- const errors = (0, class_validator_1.validateSync)(this);
663
- return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
664
- }
665
- static fromPlain(plain) {
666
- return (0, class_transformer_1.plainToClass)(SellCarFetchDTO, plain);
667
- }
668
- toPlain() {
669
- return (0, class_transformer_1.classToPlain)(this);
670
- }
671
- }
672
- exports.SellCarFetchDTO = SellCarFetchDTO;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./dto/SellCarRequestDTO"), exports);