@alba-cars/common-modules 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/network/endpoint-config.d.ts +26 -5
- package/dist/core/network/endpoint-config.js +9 -0
- package/dist/features/blog/data/dto/BlogDTO.d.ts +5 -2
- package/dist/features/blog/data/dto/BlogDTO.js +15 -7
- package/dist/features/index.d.ts +1 -0
- package/dist/features/index.js +1 -0
- package/dist/features/lead/data/dto/lead_dto.d.ts +26 -0
- package/dist/features/lead/data/dto/lead_dto.js +103 -0
- package/dist/features/lead/data/dto/lead_prefernce_dto.d.ts +11 -0
- package/dist/features/lead/data/dto/lead_prefernce_dto.js +59 -0
- package/dist/features/lead/data/enum/lead_source_status_types.d.ts +8 -0
- package/dist/features/lead/data/enum/lead_source_status_types.js +12 -0
- package/dist/features/lead/data/enum/lead_status_type.d.ts +8 -0
- package/dist/features/lead/data/enum/lead_status_type.js +12 -0
- package/dist/features/vehicle/data/dto/SimilarVehicleDTO.d.ts +8 -0
- package/dist/features/vehicle/data/dto/SimilarVehicleDTO.js +28 -0
- package/dist/features/vehicle/data/dto/VehicleFilterDTO.d.ts +1 -0
- package/dist/features/vehicle/data/dto/VehicleMedia.d.ts +1 -0
- package/dist/features/vehicle/data/dto/VehicleMedia.js +4 -0
- package/dist/features/vehicle/data/dto/index.d.ts +1 -0
- package/dist/features/vehicle/data/dto/index.js +1 -0
- package/dist/features/vehicle/data/utilities.d.ts +1 -0
- package/dist/features/vehicle/data/utilities.js +0 -1202
- package/dist/features/vehicle-reservations/data/dto/VehicleReservationDTO.d.ts +95 -0
- package/dist/features/vehicle-reservations/data/dto/VehicleReservationDTO.js +323 -0
- package/dist/features/vehicle-reservations/data/dto/index.d.ts +1 -0
- package/dist/features/vehicle-reservations/data/dto/index.js +17 -0
- package/dist/features/vehicle-reservations/data/enums/finance-type.d.ts +5 -0
- package/dist/features/vehicle-reservations/data/enums/finance-type.js +9 -0
- package/dist/features/vehicle-reservations/data/enums/index.d.ts +3 -0
- package/dist/features/vehicle-reservations/data/enums/index.js +19 -0
- package/dist/features/vehicle-reservations/data/enums/reservation-type.d.ts +9 -0
- package/dist/features/vehicle-reservations/data/enums/reservation-type.js +13 -0
- package/dist/features/vehicle-reservations/data/enums/vehicle-reservation-type.d.ts +4 -0
- package/dist/features/vehicle-reservations/data/enums/vehicle-reservation-type.js +8 -0
- package/dist/features/vehicle-reservations/index.d.ts +2 -0
- package/dist/features/vehicle-reservations/index.js +18 -0
- package/package.json +1 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { FinanceType } from "../enums/finance-type";
|
|
2
|
+
import { ReservationStatus } from "../enums/reservation-type";
|
|
3
|
+
import { Vehicle } from "../../../vehicle/data";
|
|
4
|
+
import { PaginationOptions } from "../../../../global";
|
|
5
|
+
import { LeadDTO } from "../../../lead/data/dto/lead_dto";
|
|
6
|
+
export declare class CreateVehicleReservationDto {
|
|
7
|
+
leadId?: string;
|
|
8
|
+
newLead?: LeadDTO;
|
|
9
|
+
vehicleId: string;
|
|
10
|
+
financeType: FinanceType;
|
|
11
|
+
depositAmount?: number;
|
|
12
|
+
depositPaymentMethod?: string;
|
|
13
|
+
totalAmount?: number;
|
|
14
|
+
notes?: string;
|
|
15
|
+
assignedSalesRepId?: string;
|
|
16
|
+
bankName?: string;
|
|
17
|
+
loanAmount?: number;
|
|
18
|
+
loanTenureMonths?: number;
|
|
19
|
+
interestRate?: number;
|
|
20
|
+
validate(): string[];
|
|
21
|
+
static fromPlain(plain: Record<string, unknown>): CreateVehicleReservationDto;
|
|
22
|
+
toPlain(): Record<string, unknown>;
|
|
23
|
+
}
|
|
24
|
+
export declare class VehicleReservationDto {
|
|
25
|
+
id: string;
|
|
26
|
+
leadId: LeadDTO;
|
|
27
|
+
vehicleId: string;
|
|
28
|
+
financeType: FinanceType;
|
|
29
|
+
depositAmount?: number;
|
|
30
|
+
depositPaymentMethod?: string;
|
|
31
|
+
totalAmount?: number;
|
|
32
|
+
notes?: string;
|
|
33
|
+
assignedSalesRepId?: string;
|
|
34
|
+
bankName?: string;
|
|
35
|
+
loanAmount?: number;
|
|
36
|
+
loanTenureMonths?: number;
|
|
37
|
+
interestRate?: number;
|
|
38
|
+
validate(): string[];
|
|
39
|
+
static fromPlain(plain: Record<string, unknown>): CreateVehicleReservationDto;
|
|
40
|
+
toPlain(): Record<string, unknown>;
|
|
41
|
+
}
|
|
42
|
+
export declare class VehicleReservationResponseDto {
|
|
43
|
+
id: string;
|
|
44
|
+
leadId: string;
|
|
45
|
+
vehicle: Vehicle;
|
|
46
|
+
status: ReservationStatus;
|
|
47
|
+
financeType: FinanceType;
|
|
48
|
+
depositAmount: number;
|
|
49
|
+
isDepositPaid: boolean;
|
|
50
|
+
totalAmount?: number;
|
|
51
|
+
createdAt: Date;
|
|
52
|
+
updatedAt: Date;
|
|
53
|
+
}
|
|
54
|
+
export declare class UpdateVehicleReservationDto {
|
|
55
|
+
status?: ReservationStatus;
|
|
56
|
+
depositAmount?: number;
|
|
57
|
+
depositPaymentMethod?: string;
|
|
58
|
+
isDepositPaid?: boolean;
|
|
59
|
+
totalAmount?: number;
|
|
60
|
+
bankName?: string;
|
|
61
|
+
loanAmount?: number;
|
|
62
|
+
loanTenureMonths?: number;
|
|
63
|
+
notes?: string;
|
|
64
|
+
cancellationReason?: string;
|
|
65
|
+
assignedSalesRepId?: string;
|
|
66
|
+
financeRejectionReason?: string;
|
|
67
|
+
financeApprovedAt?: Date;
|
|
68
|
+
financeRejectedAt?: Date;
|
|
69
|
+
cancelledAt?: Date;
|
|
70
|
+
isActive?: boolean;
|
|
71
|
+
validate(): string[];
|
|
72
|
+
static fromPlain(plain: Record<string, unknown>): UpdateVehicleReservationDto;
|
|
73
|
+
toPlain(): Record<string, unknown>;
|
|
74
|
+
}
|
|
75
|
+
export declare class VehicleReservationsOptions extends PaginationOptions {
|
|
76
|
+
static fromPlain(plain: Record<string, unknown>): GetVehicleReservationsFilterDto;
|
|
77
|
+
toPlain(): Record<string, unknown>;
|
|
78
|
+
}
|
|
79
|
+
export declare class GetVehicleReservationsDTO {
|
|
80
|
+
filter: GetVehicleReservationsFilterDto;
|
|
81
|
+
options: VehicleReservationsOptions;
|
|
82
|
+
static fromPlain(plain: Record<string, unknown>): GetVehicleReservationsDTO;
|
|
83
|
+
toPlain(): Record<string, unknown>;
|
|
84
|
+
}
|
|
85
|
+
export declare class GetVehicleReservationsFilterDto {
|
|
86
|
+
search?: string;
|
|
87
|
+
status?: ReservationStatus;
|
|
88
|
+
financeType?: FinanceType;
|
|
89
|
+
vehicleId?: string;
|
|
90
|
+
leadId?: string;
|
|
91
|
+
isActive?: boolean;
|
|
92
|
+
validate(): string[];
|
|
93
|
+
static fromPlain(plain: Record<string, unknown>): GetVehicleReservationsFilterDto;
|
|
94
|
+
toPlain(): Record<string, unknown>;
|
|
95
|
+
}
|
|
@@ -0,0 +1,323 @@
|
|
|
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
|
+
class CreateVehicleReservationDto {
|
|
20
|
+
validate() {
|
|
21
|
+
const errors = (0, class_validator_1.validateSync)(this);
|
|
22
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
23
|
+
}
|
|
24
|
+
static fromPlain(plain) {
|
|
25
|
+
return (0, class_transformer_1.plainToClass)(CreateVehicleReservationDto, plain);
|
|
26
|
+
}
|
|
27
|
+
toPlain() {
|
|
28
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsUUID)(),
|
|
33
|
+
(0, class_validator_1.ValidateIf)((o) => !o.newLead),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], CreateVehicleReservationDto.prototype, "leadId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.ValidateNested)(),
|
|
38
|
+
(0, class_transformer_1.Type)(() => lead_dto_1.LeadDTO),
|
|
39
|
+
(0, class_validator_1.ValidateIf)((o) => !o.leadId),
|
|
40
|
+
__metadata("design:type", lead_dto_1.LeadDTO)
|
|
41
|
+
], CreateVehicleReservationDto.prototype, "newLead", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsUUID)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], CreateVehicleReservationDto.prototype, "vehicleId", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_validator_1.IsEnum)(finance_type_1.FinanceType),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], CreateVehicleReservationDto.prototype, "financeType", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsNumber)(),
|
|
52
|
+
(0, class_validator_1.Min)(0),
|
|
53
|
+
(0, class_validator_1.IsOptional)(),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], CreateVehicleReservationDto.prototype, "depositAmount", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsString)(),
|
|
58
|
+
(0, class_validator_1.IsOptional)(),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], CreateVehicleReservationDto.prototype, "depositPaymentMethod", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, class_validator_1.IsNumber)(),
|
|
63
|
+
(0, class_validator_1.IsOptional)(),
|
|
64
|
+
__metadata("design:type", Number)
|
|
65
|
+
], CreateVehicleReservationDto.prototype, "totalAmount", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_validator_1.IsString)(),
|
|
68
|
+
(0, class_validator_1.IsOptional)(),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], CreateVehicleReservationDto.prototype, "notes", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, class_validator_1.IsUUID)(),
|
|
73
|
+
(0, class_validator_1.IsOptional)(),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], CreateVehicleReservationDto.prototype, "assignedSalesRepId", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, class_validator_1.IsString)(),
|
|
78
|
+
(0, class_validator_1.IsOptional)(),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], CreateVehicleReservationDto.prototype, "bankName", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, class_validator_1.IsNumber)(),
|
|
83
|
+
(0, class_validator_1.IsOptional)(),
|
|
84
|
+
__metadata("design:type", Number)
|
|
85
|
+
], CreateVehicleReservationDto.prototype, "loanAmount", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, class_validator_1.IsNumber)(),
|
|
88
|
+
(0, class_validator_1.IsOptional)(),
|
|
89
|
+
__metadata("design:type", Number)
|
|
90
|
+
], CreateVehicleReservationDto.prototype, "loanTenureMonths", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, class_validator_1.IsNumber)(),
|
|
93
|
+
(0, class_validator_1.IsOptional)(),
|
|
94
|
+
__metadata("design:type", Number)
|
|
95
|
+
], CreateVehicleReservationDto.prototype, "interestRate", void 0);
|
|
96
|
+
exports.CreateVehicleReservationDto = CreateVehicleReservationDto;
|
|
97
|
+
class VehicleReservationDto {
|
|
98
|
+
validate() {
|
|
99
|
+
const errors = (0, class_validator_1.validateSync)(this);
|
|
100
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
101
|
+
}
|
|
102
|
+
static fromPlain(plain) {
|
|
103
|
+
return (0, class_transformer_1.plainToClass)(CreateVehicleReservationDto, plain);
|
|
104
|
+
}
|
|
105
|
+
toPlain() {
|
|
106
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, class_validator_1.IsUUID)(),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], VehicleReservationDto.prototype, "id", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, class_validator_1.IsUUID)(),
|
|
115
|
+
__metadata("design:type", String)
|
|
116
|
+
], VehicleReservationDto.prototype, "vehicleId", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, class_validator_1.IsEnum)(finance_type_1.FinanceType),
|
|
119
|
+
__metadata("design:type", String)
|
|
120
|
+
], VehicleReservationDto.prototype, "financeType", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, class_validator_1.IsNumber)(),
|
|
123
|
+
(0, class_validator_1.Min)(0),
|
|
124
|
+
(0, class_validator_1.IsOptional)(),
|
|
125
|
+
__metadata("design:type", Number)
|
|
126
|
+
], VehicleReservationDto.prototype, "depositAmount", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, class_validator_1.IsString)(),
|
|
129
|
+
(0, class_validator_1.IsOptional)(),
|
|
130
|
+
__metadata("design:type", String)
|
|
131
|
+
], VehicleReservationDto.prototype, "depositPaymentMethod", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, class_validator_1.IsNumber)(),
|
|
134
|
+
(0, class_validator_1.IsOptional)(),
|
|
135
|
+
__metadata("design:type", Number)
|
|
136
|
+
], VehicleReservationDto.prototype, "totalAmount", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, class_validator_1.IsString)(),
|
|
139
|
+
(0, class_validator_1.IsOptional)(),
|
|
140
|
+
__metadata("design:type", String)
|
|
141
|
+
], VehicleReservationDto.prototype, "notes", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, class_validator_1.IsUUID)(),
|
|
144
|
+
(0, class_validator_1.IsOptional)(),
|
|
145
|
+
__metadata("design:type", String)
|
|
146
|
+
], VehicleReservationDto.prototype, "assignedSalesRepId", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, class_validator_1.IsString)(),
|
|
149
|
+
(0, class_validator_1.IsOptional)(),
|
|
150
|
+
__metadata("design:type", String)
|
|
151
|
+
], VehicleReservationDto.prototype, "bankName", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, class_validator_1.IsNumber)(),
|
|
154
|
+
(0, class_validator_1.IsOptional)(),
|
|
155
|
+
__metadata("design:type", Number)
|
|
156
|
+
], VehicleReservationDto.prototype, "loanAmount", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, class_validator_1.IsNumber)(),
|
|
159
|
+
(0, class_validator_1.IsOptional)(),
|
|
160
|
+
__metadata("design:type", Number)
|
|
161
|
+
], VehicleReservationDto.prototype, "loanTenureMonths", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
(0, class_validator_1.IsNumber)(),
|
|
164
|
+
(0, class_validator_1.IsOptional)(),
|
|
165
|
+
__metadata("design:type", Number)
|
|
166
|
+
], VehicleReservationDto.prototype, "interestRate", void 0);
|
|
167
|
+
exports.VehicleReservationDto = VehicleReservationDto;
|
|
168
|
+
class VehicleReservationResponseDto {
|
|
169
|
+
}
|
|
170
|
+
exports.VehicleReservationResponseDto = VehicleReservationResponseDto;
|
|
171
|
+
class UpdateVehicleReservationDto {
|
|
172
|
+
validate() {
|
|
173
|
+
const errors = (0, class_validator_1.validateSync)(this);
|
|
174
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
175
|
+
}
|
|
176
|
+
static fromPlain(plain) {
|
|
177
|
+
return (0, class_transformer_1.plainToClass)(UpdateVehicleReservationDto, plain);
|
|
178
|
+
}
|
|
179
|
+
toPlain() {
|
|
180
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
__decorate([
|
|
184
|
+
(0, class_validator_1.IsEnum)(reservation_type_1.ReservationStatus),
|
|
185
|
+
(0, class_validator_1.IsOptional)(),
|
|
186
|
+
__metadata("design:type", String)
|
|
187
|
+
], UpdateVehicleReservationDto.prototype, "status", void 0);
|
|
188
|
+
__decorate([
|
|
189
|
+
(0, class_validator_1.IsNumber)(),
|
|
190
|
+
(0, class_validator_1.IsOptional)(),
|
|
191
|
+
__metadata("design:type", Number)
|
|
192
|
+
], UpdateVehicleReservationDto.prototype, "depositAmount", void 0);
|
|
193
|
+
__decorate([
|
|
194
|
+
(0, class_validator_1.IsString)(),
|
|
195
|
+
(0, class_validator_1.IsOptional)(),
|
|
196
|
+
__metadata("design:type", String)
|
|
197
|
+
], UpdateVehicleReservationDto.prototype, "depositPaymentMethod", void 0);
|
|
198
|
+
__decorate([
|
|
199
|
+
(0, class_validator_1.IsBoolean)(),
|
|
200
|
+
(0, class_validator_1.IsOptional)(),
|
|
201
|
+
__metadata("design:type", Boolean)
|
|
202
|
+
], UpdateVehicleReservationDto.prototype, "isDepositPaid", void 0);
|
|
203
|
+
__decorate([
|
|
204
|
+
(0, class_validator_1.IsNumber)(),
|
|
205
|
+
(0, class_validator_1.IsOptional)(),
|
|
206
|
+
__metadata("design:type", Number)
|
|
207
|
+
], UpdateVehicleReservationDto.prototype, "totalAmount", void 0);
|
|
208
|
+
__decorate([
|
|
209
|
+
(0, class_validator_1.IsString)(),
|
|
210
|
+
(0, class_validator_1.IsOptional)(),
|
|
211
|
+
__metadata("design:type", String)
|
|
212
|
+
], UpdateVehicleReservationDto.prototype, "bankName", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
(0, class_validator_1.IsNumber)(),
|
|
215
|
+
(0, class_validator_1.IsOptional)(),
|
|
216
|
+
__metadata("design:type", Number)
|
|
217
|
+
], UpdateVehicleReservationDto.prototype, "loanAmount", void 0);
|
|
218
|
+
__decorate([
|
|
219
|
+
(0, class_validator_1.IsNumber)(),
|
|
220
|
+
(0, class_validator_1.IsOptional)(),
|
|
221
|
+
__metadata("design:type", Number)
|
|
222
|
+
], UpdateVehicleReservationDto.prototype, "loanTenureMonths", void 0);
|
|
223
|
+
__decorate([
|
|
224
|
+
(0, class_validator_1.IsString)(),
|
|
225
|
+
(0, class_validator_1.IsOptional)(),
|
|
226
|
+
__metadata("design:type", String)
|
|
227
|
+
], UpdateVehicleReservationDto.prototype, "notes", void 0);
|
|
228
|
+
__decorate([
|
|
229
|
+
(0, class_validator_1.IsString)(),
|
|
230
|
+
(0, class_validator_1.IsOptional)(),
|
|
231
|
+
__metadata("design:type", String)
|
|
232
|
+
], UpdateVehicleReservationDto.prototype, "cancellationReason", void 0);
|
|
233
|
+
__decorate([
|
|
234
|
+
(0, class_validator_1.IsUUID)(),
|
|
235
|
+
(0, class_validator_1.IsOptional)(),
|
|
236
|
+
__metadata("design:type", String)
|
|
237
|
+
], UpdateVehicleReservationDto.prototype, "assignedSalesRepId", void 0);
|
|
238
|
+
__decorate([
|
|
239
|
+
(0, class_validator_1.IsString)(),
|
|
240
|
+
(0, class_validator_1.IsOptional)(),
|
|
241
|
+
__metadata("design:type", String)
|
|
242
|
+
], UpdateVehicleReservationDto.prototype, "financeRejectionReason", void 0);
|
|
243
|
+
__decorate([
|
|
244
|
+
(0, class_validator_1.IsDate)(),
|
|
245
|
+
(0, class_validator_1.IsOptional)(),
|
|
246
|
+
__metadata("design:type", Date)
|
|
247
|
+
], UpdateVehicleReservationDto.prototype, "financeApprovedAt", void 0);
|
|
248
|
+
__decorate([
|
|
249
|
+
(0, class_validator_1.IsDate)(),
|
|
250
|
+
(0, class_validator_1.IsOptional)(),
|
|
251
|
+
__metadata("design:type", Date)
|
|
252
|
+
], UpdateVehicleReservationDto.prototype, "financeRejectedAt", void 0);
|
|
253
|
+
__decorate([
|
|
254
|
+
(0, class_validator_1.IsDate)(),
|
|
255
|
+
(0, class_validator_1.IsOptional)(),
|
|
256
|
+
__metadata("design:type", Date)
|
|
257
|
+
], UpdateVehicleReservationDto.prototype, "cancelledAt", void 0);
|
|
258
|
+
__decorate([
|
|
259
|
+
(0, class_validator_1.IsBoolean)(),
|
|
260
|
+
(0, class_validator_1.IsOptional)(),
|
|
261
|
+
__metadata("design:type", Boolean)
|
|
262
|
+
], UpdateVehicleReservationDto.prototype, "isActive", void 0);
|
|
263
|
+
exports.UpdateVehicleReservationDto = UpdateVehicleReservationDto;
|
|
264
|
+
class VehicleReservationsOptions extends global_1.PaginationOptions {
|
|
265
|
+
static fromPlain(plain) {
|
|
266
|
+
return (0, class_transformer_1.plainToClass)(GetVehicleReservationsFilterDto, plain);
|
|
267
|
+
}
|
|
268
|
+
toPlain() {
|
|
269
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
exports.VehicleReservationsOptions = VehicleReservationsOptions;
|
|
273
|
+
class GetVehicleReservationsDTO {
|
|
274
|
+
static fromPlain(plain) {
|
|
275
|
+
return (0, class_transformer_1.plainToClass)(GetVehicleReservationsDTO, plain);
|
|
276
|
+
}
|
|
277
|
+
toPlain() {
|
|
278
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
exports.GetVehicleReservationsDTO = GetVehicleReservationsDTO;
|
|
282
|
+
class GetVehicleReservationsFilterDto {
|
|
283
|
+
validate() {
|
|
284
|
+
const errors = (0, class_validator_1.validateSync)(this);
|
|
285
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
286
|
+
}
|
|
287
|
+
static fromPlain(plain) {
|
|
288
|
+
return (0, class_transformer_1.plainToClass)(GetVehicleReservationsFilterDto, plain);
|
|
289
|
+
}
|
|
290
|
+
toPlain() {
|
|
291
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
__decorate([
|
|
295
|
+
(0, class_validator_1.IsOptional)(),
|
|
296
|
+
__metadata("design:type", String)
|
|
297
|
+
], GetVehicleReservationsFilterDto.prototype, "search", void 0);
|
|
298
|
+
__decorate([
|
|
299
|
+
(0, class_validator_1.IsEnum)(reservation_type_1.ReservationStatus),
|
|
300
|
+
(0, class_validator_1.IsOptional)(),
|
|
301
|
+
__metadata("design:type", String)
|
|
302
|
+
], GetVehicleReservationsFilterDto.prototype, "status", void 0);
|
|
303
|
+
__decorate([
|
|
304
|
+
(0, class_validator_1.IsEnum)(finance_type_1.FinanceType),
|
|
305
|
+
(0, class_validator_1.IsOptional)(),
|
|
306
|
+
__metadata("design:type", String)
|
|
307
|
+
], GetVehicleReservationsFilterDto.prototype, "financeType", void 0);
|
|
308
|
+
__decorate([
|
|
309
|
+
(0, class_validator_1.IsUUID)(),
|
|
310
|
+
(0, class_validator_1.IsOptional)(),
|
|
311
|
+
__metadata("design:type", String)
|
|
312
|
+
], GetVehicleReservationsFilterDto.prototype, "vehicleId", void 0);
|
|
313
|
+
__decorate([
|
|
314
|
+
(0, class_validator_1.IsUUID)(),
|
|
315
|
+
(0, class_validator_1.IsOptional)(),
|
|
316
|
+
__metadata("design:type", String)
|
|
317
|
+
], GetVehicleReservationsFilterDto.prototype, "leadId", void 0);
|
|
318
|
+
__decorate([
|
|
319
|
+
(0, class_validator_1.IsBoolean)(),
|
|
320
|
+
(0, class_validator_1.IsOptional)(),
|
|
321
|
+
__metadata("design:type", Boolean)
|
|
322
|
+
], GetVehicleReservationsFilterDto.prototype, "isActive", void 0);
|
|
323
|
+
exports.GetVehicleReservationsFilterDto = GetVehicleReservationsFilterDto;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./VehicleReservationDTO";
|
|
@@ -0,0 +1,17 @@
|
|
|
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);
|
|
@@ -0,0 +1,9 @@
|
|
|
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 = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
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);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare enum ReservationStatus {
|
|
2
|
+
PENDING = "PENDING",
|
|
3
|
+
CONFIRMED = "CONFIRMED",
|
|
4
|
+
CANCELLED = "CANCELLED",
|
|
5
|
+
COMPLETED = "COMPLETED",
|
|
6
|
+
AWAITING_FINANCE = "AWAITING_FINANCE",
|
|
7
|
+
FINANCE_APPROVED = "FINANCE_APPROVED",
|
|
8
|
+
FINANCE_REJECTED = "FINANCE_REJECTED"
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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 = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
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 = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
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);
|
package/package.json
CHANGED