@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.
- package/dist/index.js +1 -21
- package/package.json +10 -6
- package/dist/core/enums/HttpMethods.js +0 -14
- package/dist/core/enums/HttpStatusCodes.js +0 -19
- package/dist/core/enums/index.js +0 -18
- package/dist/core/error-handling/AppError.js +0 -48
- package/dist/core/error-handling/index.js +0 -17
- package/dist/core/index.js +0 -21
- package/dist/core/models/index.js +0 -19
- package/dist/core/models/media/index.js +0 -17
- package/dist/core/models/media/media_data.js +0 -2
- package/dist/core/models/pagination/index.js +0 -17
- package/dist/core/models/pagination/paginated_data.js +0 -21
- package/dist/core/models/range.js +0 -26
- package/dist/core/network/api-client.d.ts +0 -1
- package/dist/core/network/api-client.js +0 -22
- package/dist/core/network/endpoint-config.js +0 -260
- package/dist/core/network/fetch-api.js +0 -206
- package/dist/core/network/index.js +0 -18
- package/dist/core/utils/formatCurrency.js +0 -39
- package/dist/core/utils/global-constants.js +0 -9
- package/dist/core/utils/global-utils.js +0 -190
- package/dist/core/utils/global_validators.js +0 -20
- package/dist/core/utils/index.js +0 -20
- package/dist/core/utils/query_flatten.js +0 -15
- package/dist/features/auth/data/dto/AuthDTO.js +0 -106
- package/dist/features/auth/data/dto/RoleDTO.js +0 -132
- package/dist/features/auth/data/dto/UserDTO.js +0 -222
- package/dist/features/auth/data/index.js +0 -19
- package/dist/features/auth/index.js +0 -17
- package/dist/features/bank-valuation-request/data/dto/BankValuationRequestDTO.js +0 -132
- package/dist/features/bank-valuation-request/index.js +0 -17
- package/dist/features/blog/data/dto/BlogDTO.js +0 -176
- package/dist/features/blog/index.js +0 -17
- package/dist/features/callback-request/data/dto/CallBackRequestDTO.js +0 -110
- package/dist/features/callback-request/index.js +0 -17
- package/dist/features/deposits/data/dto/DepositDTOs.js +0 -303
- package/dist/features/deposits/data/index.js +0 -17
- package/dist/features/deposits/index.js +0 -17
- package/dist/features/faq/data/dtos/CreateFaqDTO.js +0 -87
- package/dist/features/faq/data/dtos/FaqFetchDTO.js +0 -349
- package/dist/features/faq/data/dtos/UpdateFaqDTO.js +0 -91
- package/dist/features/faq/data/dtos/index.js +0 -19
- package/dist/features/faq/data/enums/index.js +0 -10
- package/dist/features/faq/data/index.js +0 -18
- package/dist/features/faq/index.js +0 -17
- package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.js +0 -429
- package/dist/features/finance-eligibilty-request/data/index.js +0 -17
- package/dist/features/finance-eligibilty-request/index.js +0 -17
- package/dist/features/google-review/data/dto/google_review_dto.js +0 -466
- package/dist/features/google-review/data/dto/index.js +0 -17
- package/dist/features/google-review/data/enums/index.js +0 -8
- package/dist/features/google-review/data/index.js +0 -18
- package/dist/features/google-review/index.js +0 -17
- package/dist/features/index.js +0 -34
- package/dist/features/lead/data/dto/index.js +0 -20
- package/dist/features/lead/data/dto/lead_documents_dto.js +0 -73
- package/dist/features/lead/data/dto/lead_dto.js +0 -435
- package/dist/features/lead/data/dto/lead_preference_history_dto.js +0 -321
- package/dist/features/lead/data/dto/lead_prefernce_dto.js +0 -308
- package/dist/features/lead/data/enum/index.js +0 -18
- package/dist/features/lead/data/enum/lead_source_status_types.js +0 -19
- package/dist/features/lead/data/enum/lead_status_type.js +0 -12
- package/dist/features/lead/index.js +0 -18
- package/dist/features/models/BankValuationRequest.js +0 -6
- package/dist/features/models/Base.js +0 -6
- package/dist/features/models/Deposit.js +0 -6
- package/dist/features/models/Lead.js +0 -6
- package/dist/features/models/Payment.js +0 -7
- package/dist/features/models/Roles.js +0 -2
- package/dist/features/models/Ticket.js +0 -12
- package/dist/features/models/User.js +0 -2
- package/dist/features/models/UserFavoriteVehicle.js +0 -6
- package/dist/features/models/Vehicle.js +0 -17
- package/dist/features/models/VehicleBodyType.js +0 -7
- package/dist/features/models/VehicleCategory.js +0 -7
- package/dist/features/models/VehicleFeature.js +0 -7
- package/dist/features/models/VehicleFeatureCategory.js +0 -7
- package/dist/features/models/VehicleFinance.js +0 -7
- package/dist/features/models/VehicleMake.js +0 -7
- package/dist/features/models/VehicleMedia.js +0 -7
- package/dist/features/models/VehicleMetaData.js +0 -7
- package/dist/features/models/VehicleModel.js +0 -7
- package/dist/features/models/VehicleOrder.js +0 -7
- package/dist/features/models/_index.js +0 -30
- package/dist/features/models/index.js +0 -37
- package/dist/features/newsletter/data/dto/NewsletterDTO.js +0 -79
- package/dist/features/newsletter/index.js +0 -17
- package/dist/features/sales-team/data/dto/LanguageDTO.js +0 -89
- package/dist/features/sales-team/data/dto/SalesAgentDTO.js +0 -613
- package/dist/features/sales-team/data/index.js +0 -18
- package/dist/features/sales-team/index.js +0 -17
- package/dist/features/sell-car-request/data/dto/SellCarRequestDTO.js +0 -672
- package/dist/features/sell-car-request/data/index.js +0 -17
- package/dist/features/sell-car-request/index.js +0 -17
- package/dist/features/showroom-visit/data/dto/ShowroomVisit.js +0 -237
- package/dist/features/showroom-visit/data/enums/index.js +0 -17
- package/dist/features/showroom-visit/data/index.js +0 -18
- package/dist/features/showroom-visit/index.js +0 -17
- package/dist/features/test-drive-request/api/GetTestDriveVehicles.js +0 -8
- package/dist/features/test-drive-request/api/index.js +0 -17
- package/dist/features/test-drive-request/data/dto/TestDriveRequestDTO.js +0 -179
- package/dist/features/test-drive-request/data/enums/index.js +0 -29
- package/dist/features/test-drive-request/data/index.js +0 -20
- package/dist/features/test-drive-request/data/models/TestDriveRequest.js +0 -7
- package/dist/features/test-drive-request/data/models/index.js +0 -5
- package/dist/features/test-drive-request/data/utilities.js +0 -100
- package/dist/features/test-drive-request/index.js +0 -18
- package/dist/features/tickets/data/dto/TicketDto.js +0 -293
- package/dist/features/tickets/data/enums/index.js +0 -18
- package/dist/features/tickets/index.js +0 -18
- package/dist/features/vehicle/data/dto/BaseDTO.js +0 -34
- package/dist/features/vehicle/data/dto/MediaDTO.js +0 -2
- package/dist/features/vehicle/data/dto/PaymentDTO.js +0 -161
- package/dist/features/vehicle/data/dto/SimilarVehicleDTO.js +0 -38
- package/dist/features/vehicle/data/dto/VehicleCategoryDTO.js +0 -114
- package/dist/features/vehicle/data/dto/VehicleDTO.js +0 -587
- package/dist/features/vehicle/data/dto/VehicleFavoritesDTO.js +0 -60
- package/dist/features/vehicle/data/dto/VehicleFeatureCategoriesDTO.js +0 -114
- package/dist/features/vehicle/data/dto/VehicleFeatureDTO.js +0 -125
- package/dist/features/vehicle/data/dto/VehicleFilterDTO.js +0 -771
- package/dist/features/vehicle/data/dto/VehicleFinanceDTO.js +0 -183
- package/dist/features/vehicle/data/dto/VehicleInspectionDTO.js +0 -765
- package/dist/features/vehicle/data/dto/VehicleMakeDTO.js +0 -189
- package/dist/features/vehicle/data/dto/VehicleMedia.js +0 -152
- package/dist/features/vehicle/data/dto/VehicleModelDTO.js +0 -182
- package/dist/features/vehicle/data/dto/VehicleOrderDTO.js +0 -139
- package/dist/features/vehicle/data/dto/VehicleTypeDTO.js +0 -102
- package/dist/features/vehicle/data/dto/VehicleWarrantyDTO.js +0 -47
- package/dist/features/vehicle/data/dto/index.js +0 -35
- package/dist/features/vehicle/data/enums/index.js +0 -46
- package/dist/features/vehicle/data/index.js +0 -20
- package/dist/features/vehicle/data/utilities.js +0 -520
- package/dist/features/vehicle/index.js +0 -17
- package/dist/features/vehicle-reservations/data/dto/VehicleReservationDTO.js +0 -346
- package/dist/features/vehicle-reservations/data/dto/index.js +0 -17
- package/dist/features/vehicle-reservations/data/enums/finance-type.js +0 -9
- package/dist/features/vehicle-reservations/data/enums/index.js +0 -19
- package/dist/features/vehicle-reservations/data/enums/reservation-type.js +0 -13
- package/dist/features/vehicle-reservations/data/enums/vehicle-reservation-type.js +0 -8
- package/dist/features/vehicle-reservations/index.js +0 -18
- package/dist/global/dto/BaseGetDTO.js +0 -18
- package/dist/global/dto/index.js +0 -17
- package/dist/global/index.js +0 -18
- package/dist/global/utilities.js +0 -173
- package/dist/models.js +0 -17
|
@@ -1,346 +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.GetVehicleReservationsFilterDto = exports.GetVehicleReservationsDTO = exports.VehicleReservationsOptions = exports.UpdateVehicleReservationDto = exports.VehicleReservationResponseDto = exports.VehicleReservationDto = exports.CreateVehicleReservationDto = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
const finance_type_1 = require("../enums/finance-type");
|
|
15
|
-
const reservation_type_1 = require("../enums/reservation-type");
|
|
16
|
-
const class_transformer_1 = require("class-transformer");
|
|
17
|
-
const global_1 = require("../../../../global");
|
|
18
|
-
const lead_dto_1 = require("../../../lead/data/dto/lead_dto");
|
|
19
|
-
const faq_1 = require("../../../faq");
|
|
20
|
-
class CreateVehicleReservationDto {
|
|
21
|
-
validate() {
|
|
22
|
-
const errors = (0, class_validator_1.validateSync)(this);
|
|
23
|
-
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
24
|
-
}
|
|
25
|
-
static fromPlain(plain) {
|
|
26
|
-
return (0, class_transformer_1.plainToClass)(CreateVehicleReservationDto, plain);
|
|
27
|
-
}
|
|
28
|
-
toPlain() {
|
|
29
|
-
return (0, class_transformer_1.classToPlain)(this);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, class_validator_1.IsUUID)(),
|
|
34
|
-
(0, class_validator_1.ValidateIf)((o) => !o.newLead),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], CreateVehicleReservationDto.prototype, "leadId", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, class_validator_1.ValidateNested)(),
|
|
39
|
-
(0, class_transformer_1.Type)(() => lead_dto_1.LeadCreateDTO),
|
|
40
|
-
(0, class_validator_1.ValidateIf)((o) => !o.leadId),
|
|
41
|
-
__metadata("design:type", lead_dto_1.LeadCreateDTO)
|
|
42
|
-
], CreateVehicleReservationDto.prototype, "newLead", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, class_validator_1.IsUUID)(),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], CreateVehicleReservationDto.prototype, "vehicleId", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, class_validator_1.IsEnum)(finance_type_1.FinanceType),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], CreateVehicleReservationDto.prototype, "financeType", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, class_validator_1.IsNumber)(),
|
|
53
|
-
(0, class_validator_1.Min)(0),
|
|
54
|
-
(0, class_validator_1.IsOptional)(),
|
|
55
|
-
__metadata("design:type", Number)
|
|
56
|
-
], CreateVehicleReservationDto.prototype, "depositAmount", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, class_validator_1.IsString)(),
|
|
59
|
-
(0, class_validator_1.IsOptional)(),
|
|
60
|
-
__metadata("design:type", String)
|
|
61
|
-
], CreateVehicleReservationDto.prototype, "depositPaymentMethod", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, class_validator_1.IsNumber)(),
|
|
64
|
-
(0, class_validator_1.IsOptional)(),
|
|
65
|
-
__metadata("design:type", Number)
|
|
66
|
-
], CreateVehicleReservationDto.prototype, "totalAmount", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, class_validator_1.IsString)(),
|
|
69
|
-
(0, class_validator_1.IsOptional)(),
|
|
70
|
-
__metadata("design:type", String)
|
|
71
|
-
], CreateVehicleReservationDto.prototype, "notes", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
(0, class_validator_1.IsUUID)(),
|
|
74
|
-
(0, class_validator_1.IsOptional)(),
|
|
75
|
-
__metadata("design:type", String)
|
|
76
|
-
], CreateVehicleReservationDto.prototype, "assignedSalesRepId", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
(0, class_validator_1.IsString)(),
|
|
79
|
-
(0, class_validator_1.IsOptional)(),
|
|
80
|
-
__metadata("design:type", String)
|
|
81
|
-
], CreateVehicleReservationDto.prototype, "bankName", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, class_validator_1.IsNumber)(),
|
|
84
|
-
(0, class_validator_1.IsOptional)(),
|
|
85
|
-
__metadata("design:type", Number)
|
|
86
|
-
], CreateVehicleReservationDto.prototype, "loanAmount", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
(0, class_validator_1.IsNumber)(),
|
|
89
|
-
(0, class_validator_1.IsOptional)(),
|
|
90
|
-
__metadata("design:type", Number)
|
|
91
|
-
], CreateVehicleReservationDto.prototype, "loanTenureMonths", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, class_validator_1.IsNumber)(),
|
|
94
|
-
(0, class_validator_1.IsOptional)(),
|
|
95
|
-
__metadata("design:type", Number)
|
|
96
|
-
], CreateVehicleReservationDto.prototype, "interestRate", void 0);
|
|
97
|
-
exports.CreateVehicleReservationDto = CreateVehicleReservationDto;
|
|
98
|
-
class VehicleReservationDto {
|
|
99
|
-
validate() {
|
|
100
|
-
const errors = (0, class_validator_1.validateSync)(this);
|
|
101
|
-
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
102
|
-
}
|
|
103
|
-
static fromPlain(plain) {
|
|
104
|
-
return (0, class_transformer_1.plainToClass)(CreateVehicleReservationDto, plain);
|
|
105
|
-
}
|
|
106
|
-
toPlain() {
|
|
107
|
-
return (0, class_transformer_1.classToPlain)(this);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
__decorate([
|
|
111
|
-
(0, class_validator_1.IsUUID)(),
|
|
112
|
-
__metadata("design:type", String)
|
|
113
|
-
], VehicleReservationDto.prototype, "id", void 0);
|
|
114
|
-
__decorate([
|
|
115
|
-
(0, class_validator_1.IsUUID)(),
|
|
116
|
-
__metadata("design:type", String)
|
|
117
|
-
], VehicleReservationDto.prototype, "vehicleId", void 0);
|
|
118
|
-
__decorate([
|
|
119
|
-
(0, class_validator_1.IsEnum)(finance_type_1.FinanceType),
|
|
120
|
-
__metadata("design:type", String)
|
|
121
|
-
], VehicleReservationDto.prototype, "financeType", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
(0, class_validator_1.IsNumber)(),
|
|
124
|
-
(0, class_validator_1.Min)(0),
|
|
125
|
-
(0, class_validator_1.IsOptional)(),
|
|
126
|
-
__metadata("design:type", Number)
|
|
127
|
-
], VehicleReservationDto.prototype, "depositAmount", void 0);
|
|
128
|
-
__decorate([
|
|
129
|
-
(0, class_validator_1.IsString)(),
|
|
130
|
-
(0, class_validator_1.IsOptional)(),
|
|
131
|
-
__metadata("design:type", String)
|
|
132
|
-
], VehicleReservationDto.prototype, "depositPaymentMethod", void 0);
|
|
133
|
-
__decorate([
|
|
134
|
-
(0, class_validator_1.IsNumber)(),
|
|
135
|
-
(0, class_validator_1.IsOptional)(),
|
|
136
|
-
__metadata("design:type", Number)
|
|
137
|
-
], VehicleReservationDto.prototype, "totalAmount", void 0);
|
|
138
|
-
__decorate([
|
|
139
|
-
(0, class_validator_1.IsString)(),
|
|
140
|
-
(0, class_validator_1.IsOptional)(),
|
|
141
|
-
__metadata("design:type", String)
|
|
142
|
-
], VehicleReservationDto.prototype, "notes", void 0);
|
|
143
|
-
__decorate([
|
|
144
|
-
(0, class_validator_1.IsUUID)(),
|
|
145
|
-
(0, class_validator_1.IsOptional)(),
|
|
146
|
-
__metadata("design:type", String)
|
|
147
|
-
], VehicleReservationDto.prototype, "assignedSalesRepId", void 0);
|
|
148
|
-
__decorate([
|
|
149
|
-
(0, class_validator_1.IsString)(),
|
|
150
|
-
(0, class_validator_1.IsOptional)(),
|
|
151
|
-
__metadata("design:type", String)
|
|
152
|
-
], VehicleReservationDto.prototype, "bankName", void 0);
|
|
153
|
-
__decorate([
|
|
154
|
-
(0, class_validator_1.IsNumber)(),
|
|
155
|
-
(0, class_validator_1.IsOptional)(),
|
|
156
|
-
__metadata("design:type", Number)
|
|
157
|
-
], VehicleReservationDto.prototype, "loanAmount", void 0);
|
|
158
|
-
__decorate([
|
|
159
|
-
(0, class_validator_1.IsNumber)(),
|
|
160
|
-
(0, class_validator_1.IsOptional)(),
|
|
161
|
-
__metadata("design:type", Number)
|
|
162
|
-
], VehicleReservationDto.prototype, "loanTenureMonths", void 0);
|
|
163
|
-
__decorate([
|
|
164
|
-
(0, class_validator_1.IsNumber)(),
|
|
165
|
-
(0, class_validator_1.IsOptional)(),
|
|
166
|
-
__metadata("design:type", Number)
|
|
167
|
-
], VehicleReservationDto.prototype, "interestRate", void 0);
|
|
168
|
-
exports.VehicleReservationDto = VehicleReservationDto;
|
|
169
|
-
class VehicleReservationResponseDto {
|
|
170
|
-
}
|
|
171
|
-
exports.VehicleReservationResponseDto = VehicleReservationResponseDto;
|
|
172
|
-
class UpdateVehicleReservationDto {
|
|
173
|
-
validate() {
|
|
174
|
-
const errors = (0, class_validator_1.validateSync)(this);
|
|
175
|
-
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
176
|
-
}
|
|
177
|
-
static fromPlain(plain) {
|
|
178
|
-
return (0, class_transformer_1.plainToClass)(UpdateVehicleReservationDto, plain);
|
|
179
|
-
}
|
|
180
|
-
toPlain() {
|
|
181
|
-
return (0, class_transformer_1.classToPlain)(this);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
__decorate([
|
|
185
|
-
(0, class_validator_1.IsEnum)(reservation_type_1.ReservationStatus),
|
|
186
|
-
(0, class_validator_1.IsOptional)(),
|
|
187
|
-
__metadata("design:type", String)
|
|
188
|
-
], UpdateVehicleReservationDto.prototype, "status", void 0);
|
|
189
|
-
__decorate([
|
|
190
|
-
(0, class_validator_1.IsNumber)(),
|
|
191
|
-
(0, class_validator_1.IsOptional)(),
|
|
192
|
-
__metadata("design:type", Number)
|
|
193
|
-
], UpdateVehicleReservationDto.prototype, "depositAmount", void 0);
|
|
194
|
-
__decorate([
|
|
195
|
-
(0, class_validator_1.IsString)(),
|
|
196
|
-
(0, class_validator_1.IsOptional)(),
|
|
197
|
-
__metadata("design:type", String)
|
|
198
|
-
], UpdateVehicleReservationDto.prototype, "depositPaymentMethod", void 0);
|
|
199
|
-
__decorate([
|
|
200
|
-
(0, class_validator_1.IsBoolean)(),
|
|
201
|
-
(0, class_validator_1.IsOptional)(),
|
|
202
|
-
__metadata("design:type", Boolean)
|
|
203
|
-
], UpdateVehicleReservationDto.prototype, "isDepositPaid", void 0);
|
|
204
|
-
__decorate([
|
|
205
|
-
(0, class_validator_1.IsNumber)(),
|
|
206
|
-
(0, class_validator_1.IsOptional)(),
|
|
207
|
-
__metadata("design:type", Number)
|
|
208
|
-
], UpdateVehicleReservationDto.prototype, "totalAmount", void 0);
|
|
209
|
-
__decorate([
|
|
210
|
-
(0, class_validator_1.IsString)(),
|
|
211
|
-
(0, class_validator_1.IsOptional)(),
|
|
212
|
-
__metadata("design:type", String)
|
|
213
|
-
], UpdateVehicleReservationDto.prototype, "bankName", void 0);
|
|
214
|
-
__decorate([
|
|
215
|
-
(0, class_validator_1.IsNumber)(),
|
|
216
|
-
(0, class_validator_1.IsOptional)(),
|
|
217
|
-
__metadata("design:type", Number)
|
|
218
|
-
], UpdateVehicleReservationDto.prototype, "loanAmount", void 0);
|
|
219
|
-
__decorate([
|
|
220
|
-
(0, class_validator_1.IsNumber)(),
|
|
221
|
-
(0, class_validator_1.IsOptional)(),
|
|
222
|
-
__metadata("design:type", Number)
|
|
223
|
-
], UpdateVehicleReservationDto.prototype, "loanTenureMonths", void 0);
|
|
224
|
-
__decorate([
|
|
225
|
-
(0, class_validator_1.IsString)(),
|
|
226
|
-
(0, class_validator_1.IsOptional)(),
|
|
227
|
-
__metadata("design:type", String)
|
|
228
|
-
], UpdateVehicleReservationDto.prototype, "notes", void 0);
|
|
229
|
-
__decorate([
|
|
230
|
-
(0, class_validator_1.IsString)(),
|
|
231
|
-
(0, class_validator_1.IsOptional)(),
|
|
232
|
-
__metadata("design:type", String)
|
|
233
|
-
], UpdateVehicleReservationDto.prototype, "cancellationReason", void 0);
|
|
234
|
-
__decorate([
|
|
235
|
-
(0, class_validator_1.IsUUID)(),
|
|
236
|
-
(0, class_validator_1.IsOptional)(),
|
|
237
|
-
__metadata("design:type", String)
|
|
238
|
-
], UpdateVehicleReservationDto.prototype, "assignedSalesRepId", void 0);
|
|
239
|
-
__decorate([
|
|
240
|
-
(0, class_validator_1.IsString)(),
|
|
241
|
-
(0, class_validator_1.IsOptional)(),
|
|
242
|
-
__metadata("design:type", String)
|
|
243
|
-
], UpdateVehicleReservationDto.prototype, "financeRejectionReason", void 0);
|
|
244
|
-
__decorate([
|
|
245
|
-
(0, class_validator_1.IsDate)(),
|
|
246
|
-
(0, class_validator_1.IsOptional)(),
|
|
247
|
-
__metadata("design:type", Date)
|
|
248
|
-
], UpdateVehicleReservationDto.prototype, "financeApprovedAt", void 0);
|
|
249
|
-
__decorate([
|
|
250
|
-
(0, class_validator_1.IsDate)(),
|
|
251
|
-
(0, class_validator_1.IsOptional)(),
|
|
252
|
-
__metadata("design:type", Date)
|
|
253
|
-
], UpdateVehicleReservationDto.prototype, "financeRejectedAt", void 0);
|
|
254
|
-
__decorate([
|
|
255
|
-
(0, class_validator_1.IsDate)(),
|
|
256
|
-
(0, class_validator_1.IsOptional)(),
|
|
257
|
-
__metadata("design:type", Date)
|
|
258
|
-
], UpdateVehicleReservationDto.prototype, "cancelledAt", void 0);
|
|
259
|
-
__decorate([
|
|
260
|
-
(0, class_validator_1.IsBoolean)(),
|
|
261
|
-
(0, class_validator_1.IsOptional)(),
|
|
262
|
-
__metadata("design:type", Boolean)
|
|
263
|
-
], UpdateVehicleReservationDto.prototype, "isActive", void 0);
|
|
264
|
-
exports.UpdateVehicleReservationDto = UpdateVehicleReservationDto;
|
|
265
|
-
class VehicleReservationsOptions extends global_1.PaginationOptions {
|
|
266
|
-
static fromPlain(plain) {
|
|
267
|
-
return (0, class_transformer_1.plainToClass)(GetVehicleReservationsFilterDto, plain);
|
|
268
|
-
}
|
|
269
|
-
toPlain() {
|
|
270
|
-
return (0, class_transformer_1.classToPlain)(this);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
__decorate([
|
|
274
|
-
(0, class_validator_1.IsOptional)(),
|
|
275
|
-
(0, class_validator_1.ValidateNested)(),
|
|
276
|
-
(0, class_transformer_1.Type)(() => faq_1.SortDTO),
|
|
277
|
-
__metadata("design:type", Object)
|
|
278
|
-
], VehicleReservationsOptions.prototype, "sort", void 0);
|
|
279
|
-
exports.VehicleReservationsOptions = VehicleReservationsOptions;
|
|
280
|
-
class GetVehicleReservationsDTO {
|
|
281
|
-
static fromPlain(plain) {
|
|
282
|
-
return (0, class_transformer_1.plainToClass)(GetVehicleReservationsDTO, plain);
|
|
283
|
-
}
|
|
284
|
-
toPlain() {
|
|
285
|
-
return (0, class_transformer_1.classToPlain)(this);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
exports.GetVehicleReservationsDTO = GetVehicleReservationsDTO;
|
|
289
|
-
class GetVehicleReservationsFilterDto {
|
|
290
|
-
validate() {
|
|
291
|
-
const errors = (0, class_validator_1.validateSync)(this);
|
|
292
|
-
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
293
|
-
}
|
|
294
|
-
static fromPlain(plain) {
|
|
295
|
-
return (0, class_transformer_1.plainToClass)(GetVehicleReservationsFilterDto, plain);
|
|
296
|
-
}
|
|
297
|
-
toPlain() {
|
|
298
|
-
return (0, class_transformer_1.classToPlain)(this);
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
__decorate([
|
|
302
|
-
(0, class_validator_1.IsOptional)(),
|
|
303
|
-
__metadata("design:type", String)
|
|
304
|
-
], GetVehicleReservationsFilterDto.prototype, "search", void 0);
|
|
305
|
-
__decorate([
|
|
306
|
-
(0, class_validator_1.IsEnum)(reservation_type_1.ReservationStatus),
|
|
307
|
-
(0, class_validator_1.IsOptional)(),
|
|
308
|
-
__metadata("design:type", String)
|
|
309
|
-
], GetVehicleReservationsFilterDto.prototype, "status", void 0);
|
|
310
|
-
__decorate([
|
|
311
|
-
(0, class_validator_1.IsEnum)(reservation_type_1.ReservationStatus),
|
|
312
|
-
(0, class_validator_1.IsOptional)(),
|
|
313
|
-
__metadata("design:type", String)
|
|
314
|
-
], GetVehicleReservationsFilterDto.prototype, "exceptStatus", void 0);
|
|
315
|
-
__decorate([
|
|
316
|
-
(0, class_validator_1.IsEnum)(finance_type_1.FinanceType),
|
|
317
|
-
(0, class_validator_1.IsOptional)(),
|
|
318
|
-
(0, class_validator_1.IsArray)(),
|
|
319
|
-
__metadata("design:type", Array)
|
|
320
|
-
], GetVehicleReservationsFilterDto.prototype, "financeTypes", void 0);
|
|
321
|
-
__decorate([
|
|
322
|
-
(0, class_validator_1.IsEnum)(finance_type_1.FinanceType),
|
|
323
|
-
(0, class_validator_1.IsOptional)(),
|
|
324
|
-
__metadata("design:type", String)
|
|
325
|
-
], GetVehicleReservationsFilterDto.prototype, "financeType", void 0);
|
|
326
|
-
__decorate([
|
|
327
|
-
(0, class_validator_1.IsUUID)(),
|
|
328
|
-
(0, class_validator_1.IsOptional)(),
|
|
329
|
-
__metadata("design:type", String)
|
|
330
|
-
], GetVehicleReservationsFilterDto.prototype, "vehicleId", void 0);
|
|
331
|
-
__decorate([
|
|
332
|
-
(0, class_validator_1.IsObject)(),
|
|
333
|
-
(0, class_validator_1.IsOptional)(),
|
|
334
|
-
__metadata("design:type", global_1.DateFilter)
|
|
335
|
-
], GetVehicleReservationsFilterDto.prototype, "createdAt", void 0);
|
|
336
|
-
__decorate([
|
|
337
|
-
(0, class_validator_1.IsUUID)(),
|
|
338
|
-
(0, class_validator_1.IsOptional)(),
|
|
339
|
-
__metadata("design:type", String)
|
|
340
|
-
], GetVehicleReservationsFilterDto.prototype, "leadId", void 0);
|
|
341
|
-
__decorate([
|
|
342
|
-
(0, class_validator_1.IsBoolean)(),
|
|
343
|
-
(0, class_validator_1.IsOptional)(),
|
|
344
|
-
__metadata("design:type", Boolean)
|
|
345
|
-
], GetVehicleReservationsFilterDto.prototype, "isActive", void 0);
|
|
346
|
-
exports.GetVehicleReservationsFilterDto = GetVehicleReservationsFilterDto;
|
|
@@ -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("./VehicleReservationDTO"), exports);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FinanceType = void 0;
|
|
4
|
-
var FinanceType;
|
|
5
|
-
(function (FinanceType) {
|
|
6
|
-
FinanceType["READY_CASH"] = "READY_CASH";
|
|
7
|
-
FinanceType["BANK_FINANCE_WITH_RESERVATION"] = "BANK_FINANCE_WITH_RESERVATION";
|
|
8
|
-
FinanceType["BANK_FINANCE_ELIGIBILITY"] = "BANK_FINANCE_ELIGIBILITY";
|
|
9
|
-
})(FinanceType = exports.FinanceType || (exports.FinanceType = {}));
|
|
@@ -1,19 +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("./finance-type"), exports);
|
|
18
|
-
__exportStar(require("./reservation-type"), exports);
|
|
19
|
-
__exportStar(require("./vehicle-reservation-type"), exports);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ReservationStatus = void 0;
|
|
4
|
-
var ReservationStatus;
|
|
5
|
-
(function (ReservationStatus) {
|
|
6
|
-
ReservationStatus["PENDING"] = "PENDING";
|
|
7
|
-
ReservationStatus["CONFIRMED"] = "CONFIRMED";
|
|
8
|
-
ReservationStatus["CANCELLED"] = "CANCELLED";
|
|
9
|
-
ReservationStatus["COMPLETED"] = "COMPLETED";
|
|
10
|
-
ReservationStatus["AWAITING_FINANCE"] = "AWAITING_FINANCE";
|
|
11
|
-
ReservationStatus["FINANCE_APPROVED"] = "FINANCE_APPROVED";
|
|
12
|
-
ReservationStatus["FINANCE_REJECTED"] = "FINANCE_REJECTED";
|
|
13
|
-
})(ReservationStatus = exports.ReservationStatus || (exports.ReservationStatus = {}));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VehicleReservationType = void 0;
|
|
4
|
-
var VehicleReservationType;
|
|
5
|
-
(function (VehicleReservationType) {
|
|
6
|
-
VehicleReservationType["RESERVED"] = "RESERVED";
|
|
7
|
-
VehicleReservationType["PARTIAL_REQUEST"] = "PARTIAL_REQUEST"; // Multiple leads can request same vehicle
|
|
8
|
-
})(VehicleReservationType = exports.VehicleReservationType || (exports.VehicleReservationType = {}));
|
|
@@ -1,18 +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("./data/dto/index"), exports);
|
|
18
|
-
__exportStar(require("./data/enums/index"), exports);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseGetDTO = void 0;
|
|
4
|
-
const class_validator_1 = require("class-validator");
|
|
5
|
-
const class_transformer_1 = require("class-transformer");
|
|
6
|
-
class BaseGetDTO {
|
|
7
|
-
validate() {
|
|
8
|
-
const errors = (0, class_validator_1.validateSync)(this);
|
|
9
|
-
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
10
|
-
}
|
|
11
|
-
static fromPlain(plain) {
|
|
12
|
-
return (0, class_transformer_1.plainToClass)(this, plain);
|
|
13
|
-
}
|
|
14
|
-
static toPlain(entity) {
|
|
15
|
-
return (0, class_transformer_1.instanceToPlain)(entity);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.BaseGetDTO = BaseGetDTO;
|
package/dist/global/dto/index.js
DELETED
|
@@ -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("./BaseGetDTO"), exports);
|
package/dist/global/index.js
DELETED
|
@@ -1,18 +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("./utilities"), exports);
|
|
18
|
-
__exportStar(require("./dto/"), exports);
|
package/dist/global/utilities.js
DELETED
|
@@ -1,173 +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.formatImageUrl = exports.TypedOptions = exports.TypedFilter = exports.BaseFilter = exports.NumberRange = exports.DateFilter = exports.PaginationOptions = exports.IsDateOrConvertible = exports.createFieldPath = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const createFieldPath = (path) => path;
|
|
16
|
-
exports.createFieldPath = createFieldPath;
|
|
17
|
-
function IsDateOrConvertible(validationOptions) {
|
|
18
|
-
return function (object, propertyName) {
|
|
19
|
-
(0, class_validator_1.registerDecorator)({
|
|
20
|
-
name: "isDateOrConvertible",
|
|
21
|
-
target: object.constructor,
|
|
22
|
-
propertyName: propertyName,
|
|
23
|
-
options: validationOptions,
|
|
24
|
-
validator: {
|
|
25
|
-
validate(value, _args) {
|
|
26
|
-
return (value instanceof Date ||
|
|
27
|
-
typeof value === "string" ||
|
|
28
|
-
typeof value === "number");
|
|
29
|
-
},
|
|
30
|
-
defaultMessage(args) {
|
|
31
|
-
return `${args.property} must be a Date, string, or number`;
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
exports.IsDateOrConvertible = IsDateOrConvertible;
|
|
38
|
-
class PaginationOptions {
|
|
39
|
-
}
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, class_validator_1.IsOptional)(),
|
|
42
|
-
(0, class_validator_1.IsNumber)(),
|
|
43
|
-
(0, class_validator_1.Max)(100),
|
|
44
|
-
__metadata("design:type", Number)
|
|
45
|
-
], PaginationOptions.prototype, "limit", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, class_validator_1.IsOptional)(),
|
|
48
|
-
(0, class_validator_1.IsNumber)(),
|
|
49
|
-
__metadata("design:type", Number)
|
|
50
|
-
], PaginationOptions.prototype, "page", void 0);
|
|
51
|
-
exports.PaginationOptions = PaginationOptions;
|
|
52
|
-
class DateFilter {
|
|
53
|
-
}
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, class_validator_1.IsOptional)(),
|
|
56
|
-
(0, class_validator_1.Validate)(IsDateOrConvertible),
|
|
57
|
-
__metadata("design:type", Object)
|
|
58
|
-
], DateFilter.prototype, "from", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, class_validator_1.IsOptional)(),
|
|
61
|
-
(0, class_validator_1.Validate)(IsDateOrConvertible),
|
|
62
|
-
__metadata("design:type", Object)
|
|
63
|
-
], DateFilter.prototype, "to", void 0);
|
|
64
|
-
exports.DateFilter = DateFilter;
|
|
65
|
-
class NumberRange {
|
|
66
|
-
}
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, class_validator_1.IsOptional)(),
|
|
69
|
-
(0, class_validator_1.IsNumber)(),
|
|
70
|
-
__metadata("design:type", Number)
|
|
71
|
-
], NumberRange.prototype, "min", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
(0, class_validator_1.IsOptional)(),
|
|
74
|
-
(0, class_validator_1.IsNumber)(),
|
|
75
|
-
__metadata("design:type", Number)
|
|
76
|
-
], NumberRange.prototype, "max", void 0);
|
|
77
|
-
exports.NumberRange = NumberRange;
|
|
78
|
-
class BaseFilter {
|
|
79
|
-
}
|
|
80
|
-
__decorate([
|
|
81
|
-
(0, class_validator_1.IsOptional)(),
|
|
82
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
83
|
-
__metadata("design:type", Object)
|
|
84
|
-
], BaseFilter.prototype, "id", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
(0, class_validator_1.IsOptional)(),
|
|
87
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
88
|
-
__metadata("design:type", Object)
|
|
89
|
-
], BaseFilter.prototype, "createdBy", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
(0, class_validator_1.IsOptional)(),
|
|
92
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
93
|
-
__metadata("design:type", Object)
|
|
94
|
-
], BaseFilter.prototype, "updatedBy", void 0);
|
|
95
|
-
__decorate([
|
|
96
|
-
(0, class_validator_1.IsOptional)(),
|
|
97
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
98
|
-
__metadata("design:type", Object)
|
|
99
|
-
], BaseFilter.prototype, "deletedBy", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
(0, class_validator_1.IsOptional)(),
|
|
102
|
-
(0, class_validator_1.IsBoolean)(),
|
|
103
|
-
__metadata("design:type", Boolean)
|
|
104
|
-
], BaseFilter.prototype, "isDeleted", void 0);
|
|
105
|
-
__decorate([
|
|
106
|
-
(0, class_validator_1.IsOptional)(),
|
|
107
|
-
(0, class_validator_1.IsBoolean)(),
|
|
108
|
-
__metadata("design:type", Boolean)
|
|
109
|
-
], BaseFilter.prototype, "isActive", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
(0, class_validator_1.IsOptional)(),
|
|
112
|
-
(0, class_validator_1.Validate)(DateFilter),
|
|
113
|
-
__metadata("design:type", DateFilter)
|
|
114
|
-
], BaseFilter.prototype, "createdAt", void 0);
|
|
115
|
-
__decorate([
|
|
116
|
-
(0, class_validator_1.IsOptional)(),
|
|
117
|
-
(0, class_validator_1.Validate)(DateFilter),
|
|
118
|
-
__metadata("design:type", DateFilter)
|
|
119
|
-
], BaseFilter.prototype, "updatedAt", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
(0, class_validator_1.IsOptional)(),
|
|
122
|
-
(0, class_validator_1.Validate)(DateFilter),
|
|
123
|
-
__metadata("design:type", DateFilter)
|
|
124
|
-
], BaseFilter.prototype, "deletedAt", void 0);
|
|
125
|
-
exports.BaseFilter = BaseFilter;
|
|
126
|
-
class TypedFilter extends BaseFilter {
|
|
127
|
-
}
|
|
128
|
-
exports.TypedFilter = TypedFilter;
|
|
129
|
-
class TypedOptions extends PaginationOptions {
|
|
130
|
-
validate() {
|
|
131
|
-
const errors = (0, class_validator_1.validateSync)(this);
|
|
132
|
-
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
133
|
-
}
|
|
134
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
135
|
-
static fromPlain(plain) {
|
|
136
|
-
return (0, class_transformer_1.plainToClass)(TypedOptions, plain);
|
|
137
|
-
}
|
|
138
|
-
static toPlain(entity) {
|
|
139
|
-
return (0, class_transformer_1.instanceToPlain)(entity);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
exports.TypedOptions = TypedOptions;
|
|
143
|
-
function isValidUrl(url) {
|
|
144
|
-
try {
|
|
145
|
-
new URL(url);
|
|
146
|
-
return true;
|
|
147
|
-
}
|
|
148
|
-
catch {
|
|
149
|
-
return false;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
function formatImageUrl(src) {
|
|
153
|
-
if (!src) {
|
|
154
|
-
return null;
|
|
155
|
-
}
|
|
156
|
-
// Return as-is if it's already an absolute URL
|
|
157
|
-
if (isValidUrl(src)) {
|
|
158
|
-
return src;
|
|
159
|
-
}
|
|
160
|
-
// Return as-is if it's a data URL
|
|
161
|
-
if (src.startsWith("data:")) {
|
|
162
|
-
return src;
|
|
163
|
-
}
|
|
164
|
-
if (src.startsWith("/assets")) {
|
|
165
|
-
return src;
|
|
166
|
-
}
|
|
167
|
-
const domain = process.env.NEXT_PUBLIC_S3_URL;
|
|
168
|
-
// Ensure src has a leading slash
|
|
169
|
-
const normalizedSrc = src.startsWith("/") ? src : `/${src}`;
|
|
170
|
-
// Combine domain with normalized path
|
|
171
|
-
return `${domain}${normalizedSrc}`;
|
|
172
|
-
}
|
|
173
|
-
exports.formatImageUrl = formatImageUrl;
|