@alba-cars/common-modules 1.3.1 → 1.3.3
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/error-handling/AppError.d.ts +3 -1
- package/dist/core/error-handling/AppError.js +2 -0
- package/dist/core/network/endpoint-config.d.ts +5 -0
- package/dist/core/network/endpoint-config.js +7 -2
- package/dist/features/auth/data/dto/AuthDTO.d.ts +20 -0
- package/dist/features/auth/data/dto/AuthDTO.js +47 -0
- package/dist/features/auth/data/index.d.ts +1 -0
- package/dist/features/auth/data/index.js +17 -0
- package/dist/features/auth/index.d.ts +1 -0
- package/dist/features/auth/index.js +17 -0
- package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.d.ts +21 -0
- package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.js +56 -1
- package/dist/features/index.d.ts +2 -1
- package/dist/features/index.js +2 -1
- package/dist/features/lead/data/dto/lead_dto.d.ts +5 -3
- package/dist/features/lead/data/dto/lead_dto.js +20 -8
- package/dist/features/sell-car-request/data/dto/SellCarRequestDTO.d.ts +154 -0
- package/dist/features/sell-car-request/data/dto/SellCarRequestDTO.js +444 -0
- package/dist/features/sell-car-request/data/index.d.ts +1 -0
- package/dist/features/sell-car-request/data/index.js +17 -0
- package/dist/features/sell-car-request/index.d.ts +1 -0
- package/dist/features/sell-car-request/index.js +17 -0
- package/dist/features/vehicle/data/dto/BaseDTO.d.ts +3 -4
- package/dist/features/vehicle/data/dto/BaseDTO.js +6 -14
- 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/utilities.js +0 -1202
- package/dist/features/vehicle-reservations/data/dto/VehicleReservationDTO.d.ts +7 -3
- package/dist/features/vehicle-reservations/data/dto/VehicleReservationDTO.js +14 -2
- package/package.json +1 -1
|
@@ -4,7 +4,9 @@ export declare enum ErrorType {
|
|
|
4
4
|
UNAUTHORIZED = "UNAUTHORIZED",
|
|
5
5
|
FORBIDDEN = "FORBIDDEN",
|
|
6
6
|
INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR",
|
|
7
|
-
BAD_REQUEST = "BAD_REQUEST"
|
|
7
|
+
BAD_REQUEST = "BAD_REQUEST",
|
|
8
|
+
AUTHENTICATION_ERROR = "AUTHENTICATION_ERROR",
|
|
9
|
+
AUTHORIZATION_ERROR = "AUTHORIZATION_ERROR"
|
|
8
10
|
}
|
|
9
11
|
export declare class AppError extends Error {
|
|
10
12
|
message: string;
|
|
@@ -10,6 +10,8 @@ var ErrorType;
|
|
|
10
10
|
ErrorType["FORBIDDEN"] = "FORBIDDEN";
|
|
11
11
|
ErrorType["INTERNAL_SERVER_ERROR"] = "INTERNAL_SERVER_ERROR";
|
|
12
12
|
ErrorType["BAD_REQUEST"] = "BAD_REQUEST";
|
|
13
|
+
ErrorType["AUTHENTICATION_ERROR"] = "AUTHENTICATION_ERROR";
|
|
14
|
+
ErrorType["AUTHORIZATION_ERROR"] = "AUTHORIZATION_ERROR";
|
|
13
15
|
})(ErrorType = exports.ErrorType || (exports.ErrorType = {}));
|
|
14
16
|
class AppError extends Error {
|
|
15
17
|
constructor(message, statusCode, type, details) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UTIL_ENDPOINTS = exports.API_ENDPOINTS = void 0;
|
|
3
|
+
exports.AUTH_ENDPOINTS = exports.UTIL_ENDPOINTS = exports.API_ENDPOINTS = void 0;
|
|
4
4
|
exports.API_ENDPOINTS = {
|
|
5
5
|
vehicle: {
|
|
6
6
|
getAll: `/vehicle`,
|
|
@@ -130,7 +130,7 @@ exports.API_ENDPOINTS = {
|
|
|
130
130
|
getOne: (id) => `/vehicle-reservation/${id}`,
|
|
131
131
|
deleteOne: (id) => `/vehicle-reservation/${id}`,
|
|
132
132
|
updateOne: (id) => `/vehicle-reservation/${id}`,
|
|
133
|
-
}
|
|
133
|
+
},
|
|
134
134
|
};
|
|
135
135
|
exports.UTIL_ENDPOINTS = {
|
|
136
136
|
media: {
|
|
@@ -138,3 +138,8 @@ exports.UTIL_ENDPOINTS = {
|
|
|
138
138
|
preprocessMediaUrl: "/utils/process-media",
|
|
139
139
|
},
|
|
140
140
|
};
|
|
141
|
+
exports.AUTH_ENDPOINTS = {
|
|
142
|
+
login: "/auth/login",
|
|
143
|
+
register: "/auth/register",
|
|
144
|
+
getLoggedInUser: "/auth/me",
|
|
145
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare class RegisterDTO {
|
|
2
|
+
email: string;
|
|
3
|
+
password: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
phone?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class LoginDTO {
|
|
8
|
+
email: string;
|
|
9
|
+
password: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class AuthResponseDTO {
|
|
12
|
+
user: {
|
|
13
|
+
id: string;
|
|
14
|
+
email: string;
|
|
15
|
+
firstName?: string;
|
|
16
|
+
lastName?: string;
|
|
17
|
+
roles: string[];
|
|
18
|
+
};
|
|
19
|
+
token: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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.AuthResponseDTO = exports.LoginDTO = exports.RegisterDTO = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class RegisterDTO {
|
|
15
|
+
}
|
|
16
|
+
__decorate([
|
|
17
|
+
(0, class_validator_1.IsEmail)(),
|
|
18
|
+
__metadata("design:type", String)
|
|
19
|
+
], RegisterDTO.prototype, "email", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
(0, class_validator_1.MinLength)(8),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], RegisterDTO.prototype, "password", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], RegisterDTO.prototype, "name", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], RegisterDTO.prototype, "phone", void 0);
|
|
33
|
+
exports.RegisterDTO = RegisterDTO;
|
|
34
|
+
class LoginDTO {
|
|
35
|
+
}
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsEmail)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], LoginDTO.prototype, "email", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], LoginDTO.prototype, "password", void 0);
|
|
44
|
+
exports.LoginDTO = LoginDTO;
|
|
45
|
+
class AuthResponseDTO {
|
|
46
|
+
}
|
|
47
|
+
exports.AuthResponseDTO = AuthResponseDTO;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dto/AuthDTO";
|
|
@@ -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("./dto/AuthDTO"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./data";
|
|
@@ -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("./data"), exports);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PaginationOptions } from "../../../../global";
|
|
1
2
|
export declare enum SalaryType {
|
|
2
3
|
BANK_TRANSFER = "bank_transfer",
|
|
3
4
|
CASH = "cash",
|
|
@@ -90,3 +91,23 @@ export declare class FinanceEligibilityRequestResponseDTO {
|
|
|
90
91
|
static fromPlain(plain: Record<string, unknown>): FinanceEligibilityRequestResponseDTO;
|
|
91
92
|
toPlain(): Record<string, unknown>;
|
|
92
93
|
}
|
|
94
|
+
export declare class FinanceEligibiltyFilterDTO {
|
|
95
|
+
search?: string;
|
|
96
|
+
vehicleId?: string;
|
|
97
|
+
leadId?: string;
|
|
98
|
+
isActive?: boolean;
|
|
99
|
+
validate(): string[];
|
|
100
|
+
static fromPlain(plain: Record<string, unknown>): FinanceEligibiltyFilterDTO;
|
|
101
|
+
toPlain(): Record<string, unknown>;
|
|
102
|
+
}
|
|
103
|
+
export declare class FinanceEligiblityOptionsDTO extends PaginationOptions {
|
|
104
|
+
static fromPlain(plain: Record<string, unknown>): FinanceEligibiltyFilterDTO;
|
|
105
|
+
toPlain(): Record<string, unknown>;
|
|
106
|
+
}
|
|
107
|
+
export declare class FinanceElgibiltyFetchDTO {
|
|
108
|
+
filter: FinanceEligibiltyFilterDTO;
|
|
109
|
+
options: FinanceEligiblityOptionsDTO;
|
|
110
|
+
validate(): string[];
|
|
111
|
+
static fromPlain(plain: Record<string, unknown>): FinanceElgibiltyFetchDTO;
|
|
112
|
+
toPlain(): Record<string, unknown>;
|
|
113
|
+
}
|
|
@@ -9,9 +9,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.FinanceEligibilityRequestResponseDTO = exports.FinanceEligibilityRequestUpdateDTO = exports.FinanceEligibilityRequestCreateDTO = exports.YesNo = exports.EmployeeCount = exports.SalaryType = void 0;
|
|
12
|
+
exports.FinanceElgibiltyFetchDTO = exports.FinanceEligiblityOptionsDTO = exports.FinanceEligibiltyFilterDTO = exports.FinanceEligibilityRequestResponseDTO = exports.FinanceEligibilityRequestUpdateDTO = exports.FinanceEligibilityRequestCreateDTO = exports.YesNo = exports.EmployeeCount = exports.SalaryType = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const global_1 = require("../../../../global");
|
|
15
16
|
var SalaryType;
|
|
16
17
|
(function (SalaryType) {
|
|
17
18
|
SalaryType["BANK_TRANSFER"] = "bank_transfer";
|
|
@@ -284,3 +285,57 @@ __decorate([
|
|
|
284
285
|
__metadata("design:type", String)
|
|
285
286
|
], FinanceEligibilityRequestResponseDTO.prototype, "rejectionReason", void 0);
|
|
286
287
|
exports.FinanceEligibilityRequestResponseDTO = FinanceEligibilityRequestResponseDTO;
|
|
288
|
+
class FinanceEligibiltyFilterDTO {
|
|
289
|
+
validate() {
|
|
290
|
+
const errors = (0, class_validator_1.validateSync)(this);
|
|
291
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
292
|
+
}
|
|
293
|
+
static fromPlain(plain) {
|
|
294
|
+
return (0, class_transformer_1.plainToClass)(FinanceEligibiltyFilterDTO, plain);
|
|
295
|
+
}
|
|
296
|
+
toPlain() {
|
|
297
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
__decorate([
|
|
301
|
+
(0, class_validator_1.IsOptional)(),
|
|
302
|
+
__metadata("design:type", String)
|
|
303
|
+
], FinanceEligibiltyFilterDTO.prototype, "search", void 0);
|
|
304
|
+
__decorate([
|
|
305
|
+
(0, class_validator_1.IsUUID)(),
|
|
306
|
+
(0, class_validator_1.IsOptional)(),
|
|
307
|
+
__metadata("design:type", String)
|
|
308
|
+
], FinanceEligibiltyFilterDTO.prototype, "vehicleId", void 0);
|
|
309
|
+
__decorate([
|
|
310
|
+
(0, class_validator_1.IsUUID)(),
|
|
311
|
+
(0, class_validator_1.IsOptional)(),
|
|
312
|
+
__metadata("design:type", String)
|
|
313
|
+
], FinanceEligibiltyFilterDTO.prototype, "leadId", void 0);
|
|
314
|
+
__decorate([
|
|
315
|
+
(0, class_validator_1.IsBoolean)(),
|
|
316
|
+
(0, class_validator_1.IsOptional)(),
|
|
317
|
+
__metadata("design:type", Boolean)
|
|
318
|
+
], FinanceEligibiltyFilterDTO.prototype, "isActive", void 0);
|
|
319
|
+
exports.FinanceEligibiltyFilterDTO = FinanceEligibiltyFilterDTO;
|
|
320
|
+
class FinanceEligiblityOptionsDTO extends global_1.PaginationOptions {
|
|
321
|
+
static fromPlain(plain) {
|
|
322
|
+
return (0, class_transformer_1.plainToClass)(FinanceEligibiltyFilterDTO, plain);
|
|
323
|
+
}
|
|
324
|
+
toPlain() {
|
|
325
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
exports.FinanceEligiblityOptionsDTO = FinanceEligiblityOptionsDTO;
|
|
329
|
+
class FinanceElgibiltyFetchDTO {
|
|
330
|
+
validate() {
|
|
331
|
+
const errors = (0, class_validator_1.validateSync)(this);
|
|
332
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
333
|
+
}
|
|
334
|
+
static fromPlain(plain) {
|
|
335
|
+
return (0, class_transformer_1.plainToClass)(FinanceElgibiltyFetchDTO, plain);
|
|
336
|
+
}
|
|
337
|
+
toPlain() {
|
|
338
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
exports.FinanceElgibiltyFetchDTO = FinanceElgibiltyFetchDTO;
|
package/dist/features/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./sales-team";
|
|
|
4
4
|
export * from "./showroom-visit";
|
|
5
5
|
export * from "./test-drive-request";
|
|
6
6
|
export * from "./vehicle";
|
|
7
|
-
export * from "./sell-
|
|
7
|
+
export * from "./sell-car-request";
|
|
8
8
|
export * from "./finance-eligibilty-request";
|
|
9
9
|
export * from "./vehicle-reservations";
|
|
10
|
+
export * from "./auth";
|
package/dist/features/index.js
CHANGED
|
@@ -20,6 +20,7 @@ __exportStar(require("./sales-team"), exports);
|
|
|
20
20
|
__exportStar(require("./showroom-visit"), exports);
|
|
21
21
|
__exportStar(require("./test-drive-request"), exports);
|
|
22
22
|
__exportStar(require("./vehicle"), exports);
|
|
23
|
-
__exportStar(require("./sell-
|
|
23
|
+
__exportStar(require("./sell-car-request"), exports);
|
|
24
24
|
__exportStar(require("./finance-eligibilty-request"), exports);
|
|
25
25
|
__exportStar(require("./vehicle-reservations"), exports);
|
|
26
|
+
__exportStar(require("./auth"), exports);
|
|
@@ -2,6 +2,7 @@ import { LeadStatus } from "../enum/lead_status_type";
|
|
|
2
2
|
import { LeadSource } from "../enum/lead_source_status_types";
|
|
3
3
|
import { LeadPreferencesDTO } from "./lead_prefernce_dto";
|
|
4
4
|
export declare class LeadDTO {
|
|
5
|
+
id?: string;
|
|
5
6
|
firstName: string;
|
|
6
7
|
lastName: string;
|
|
7
8
|
email?: string;
|
|
@@ -17,8 +18,9 @@ export declare class LeadDTO {
|
|
|
17
18
|
isTestDriveScheduled: boolean;
|
|
18
19
|
testDriveDate?: Date;
|
|
19
20
|
isActive: boolean;
|
|
20
|
-
createdAt: Date;
|
|
21
|
-
updatedAt: Date;
|
|
22
21
|
lastContactedAt?: Date;
|
|
23
|
-
preference
|
|
22
|
+
preference?: LeadPreferencesDTO;
|
|
23
|
+
validate(): string[];
|
|
24
|
+
static fromPlain(plain: Record<string, unknown>): LeadDTO;
|
|
25
|
+
toPlain(): Record<string, unknown>;
|
|
24
26
|
}
|
|
@@ -11,8 +11,24 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.LeadDTO = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const lead_prefernce_dto_1 = require("./lead_prefernce_dto");
|
|
15
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
16
|
class LeadDTO {
|
|
17
|
+
validate() {
|
|
18
|
+
const errors = (0, class_validator_1.validateSync)(this);
|
|
19
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
20
|
+
}
|
|
21
|
+
static fromPlain(plain) {
|
|
22
|
+
return (0, class_transformer_1.plainToClass)(LeadDTO, plain);
|
|
23
|
+
}
|
|
24
|
+
toPlain() {
|
|
25
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
26
|
+
}
|
|
15
27
|
}
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsUUID)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], LeadDTO.prototype, "id", void 0);
|
|
16
32
|
__decorate([
|
|
17
33
|
(0, class_validator_1.IsString)(),
|
|
18
34
|
__metadata("design:type", String)
|
|
@@ -75,17 +91,13 @@ __decorate([
|
|
|
75
91
|
(0, class_validator_1.IsOptional)(),
|
|
76
92
|
__metadata("design:type", Boolean)
|
|
77
93
|
], LeadDTO.prototype, "isActive", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
(0, class_validator_1.IsDate)(),
|
|
80
|
-
__metadata("design:type", Date)
|
|
81
|
-
], LeadDTO.prototype, "createdAt", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, class_validator_1.IsDate)(),
|
|
84
|
-
__metadata("design:type", Date)
|
|
85
|
-
], LeadDTO.prototype, "updatedAt", void 0);
|
|
86
94
|
__decorate([
|
|
87
95
|
(0, class_validator_1.IsDate)(),
|
|
88
96
|
(0, class_validator_1.IsOptional)(),
|
|
89
97
|
__metadata("design:type", Date)
|
|
90
98
|
], LeadDTO.prototype, "lastContactedAt", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, class_validator_1.IsOptional)(),
|
|
101
|
+
__metadata("design:type", lead_prefernce_dto_1.LeadPreferencesDTO)
|
|
102
|
+
], LeadDTO.prototype, "preference", void 0);
|
|
91
103
|
exports.LeadDTO = LeadDTO;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { PaginationOptions } from "../../../../global";
|
|
2
|
+
export declare enum RequestType {
|
|
3
|
+
SELL = "sell",
|
|
4
|
+
TRADE_IN = "trade_in"
|
|
5
|
+
}
|
|
6
|
+
export declare class SellCarRequestCreateDTO {
|
|
7
|
+
name: string;
|
|
8
|
+
phone: string;
|
|
9
|
+
email?: string;
|
|
10
|
+
city: string;
|
|
11
|
+
requestType: RequestType;
|
|
12
|
+
makeId: string;
|
|
13
|
+
modelId: string;
|
|
14
|
+
year: number;
|
|
15
|
+
mileage: number;
|
|
16
|
+
expectedSellingPrice?: number;
|
|
17
|
+
vehicleOptions?: string;
|
|
18
|
+
specification?: string;
|
|
19
|
+
images?: string[];
|
|
20
|
+
desiredVehicleId?: string;
|
|
21
|
+
color?: string;
|
|
22
|
+
transmission?: string;
|
|
23
|
+
condition?: string;
|
|
24
|
+
fuelType?: string;
|
|
25
|
+
engineCapacity?: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
additionalDetails?: {
|
|
28
|
+
serviceHistory?: boolean;
|
|
29
|
+
numberOfOwners?: number;
|
|
30
|
+
accidentHistory?: boolean;
|
|
31
|
+
modifications?: string[];
|
|
32
|
+
lastServiceDate?: Date;
|
|
33
|
+
warrantyValid?: boolean;
|
|
34
|
+
tradeIn?: boolean;
|
|
35
|
+
inspectionDate?: Date;
|
|
36
|
+
inspectionLocation?: string;
|
|
37
|
+
finalTradeInOffer?: number;
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
};
|
|
40
|
+
validate(): string[];
|
|
41
|
+
static fromPlain(plain: Record<string, unknown>): SellCarRequestCreateDTO;
|
|
42
|
+
toPlain(): Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
export declare class SellCarRequestUpdateDTO {
|
|
45
|
+
name?: string;
|
|
46
|
+
phone?: string;
|
|
47
|
+
email?: string;
|
|
48
|
+
city?: string;
|
|
49
|
+
requestType?: RequestType;
|
|
50
|
+
makeId?: string;
|
|
51
|
+
modelId?: string;
|
|
52
|
+
year?: number;
|
|
53
|
+
mileage?: number;
|
|
54
|
+
expectedSellingPrice?: number;
|
|
55
|
+
vehicleOptions?: string;
|
|
56
|
+
specification?: string;
|
|
57
|
+
condition?: string;
|
|
58
|
+
images?: string[];
|
|
59
|
+
desiredVehicleId?: string;
|
|
60
|
+
color?: string;
|
|
61
|
+
transmission?: string;
|
|
62
|
+
fuelType?: string;
|
|
63
|
+
engineCapacity?: string;
|
|
64
|
+
description?: string;
|
|
65
|
+
status?: "pending" | "inspection_scheduled" | "inspected" | "valued" | "approved" | "rejected" | "completed";
|
|
66
|
+
additionalDetails?: {
|
|
67
|
+
serviceHistory?: boolean;
|
|
68
|
+
numberOfOwners?: number;
|
|
69
|
+
accidentHistory?: boolean;
|
|
70
|
+
modifications?: string[];
|
|
71
|
+
lastServiceDate?: Date;
|
|
72
|
+
warrantyValid?: boolean;
|
|
73
|
+
tradeIn?: boolean;
|
|
74
|
+
inspectionDate?: Date;
|
|
75
|
+
inspectionLocation?: string;
|
|
76
|
+
finalTradeInOffer?: number;
|
|
77
|
+
[key: string]: any;
|
|
78
|
+
};
|
|
79
|
+
validate(): string[];
|
|
80
|
+
static fromPlain(plain: Record<string, unknown>): SellCarRequestUpdateDTO;
|
|
81
|
+
toPlain(): Record<string, unknown>;
|
|
82
|
+
}
|
|
83
|
+
export declare class SellCarRequestResponseDTO {
|
|
84
|
+
id: string;
|
|
85
|
+
name: string;
|
|
86
|
+
phone: string;
|
|
87
|
+
email?: string;
|
|
88
|
+
city: string;
|
|
89
|
+
requestType: RequestType;
|
|
90
|
+
make?: {
|
|
91
|
+
id: string;
|
|
92
|
+
name: string;
|
|
93
|
+
};
|
|
94
|
+
model?: {
|
|
95
|
+
id: string;
|
|
96
|
+
name: string;
|
|
97
|
+
};
|
|
98
|
+
year?: number;
|
|
99
|
+
mileage?: number;
|
|
100
|
+
expectedSellingPrice?: number;
|
|
101
|
+
vehicleOptions?: string;
|
|
102
|
+
specification?: string;
|
|
103
|
+
images?: string[];
|
|
104
|
+
desiredVehicle?: {
|
|
105
|
+
id: string;
|
|
106
|
+
make: string;
|
|
107
|
+
model: string;
|
|
108
|
+
year: number;
|
|
109
|
+
};
|
|
110
|
+
color?: string;
|
|
111
|
+
transmission?: string;
|
|
112
|
+
condition?: string;
|
|
113
|
+
fuelType?: string;
|
|
114
|
+
engineCapacity?: string;
|
|
115
|
+
description?: string;
|
|
116
|
+
status: "pending" | "inspection_scheduled" | "inspected" | "valued" | "approved" | "rejected" | "completed";
|
|
117
|
+
additionalDetails?: {
|
|
118
|
+
serviceHistory?: boolean;
|
|
119
|
+
numberOfOwners?: number;
|
|
120
|
+
accidentHistory?: boolean;
|
|
121
|
+
modifications?: string[];
|
|
122
|
+
lastServiceDate?: Date;
|
|
123
|
+
warrantyValid?: boolean;
|
|
124
|
+
tradeIn?: boolean;
|
|
125
|
+
inspectionDate?: Date;
|
|
126
|
+
inspectionLocation?: string;
|
|
127
|
+
finalTradeInOffer?: number;
|
|
128
|
+
[key: string]: any;
|
|
129
|
+
};
|
|
130
|
+
createdAt: Date;
|
|
131
|
+
updatedAt: Date;
|
|
132
|
+
validate(): string[];
|
|
133
|
+
static fromPlain(plain: Record<string, unknown>): SellCarRequestResponseDTO;
|
|
134
|
+
toPlain(): Record<string, unknown>;
|
|
135
|
+
}
|
|
136
|
+
export declare class SellCarFilterDTO {
|
|
137
|
+
search?: string;
|
|
138
|
+
leadId?: string;
|
|
139
|
+
isActive?: boolean;
|
|
140
|
+
validate(): string[];
|
|
141
|
+
static fromPlain(plain: Record<string, unknown>): SellCarFilterDTO;
|
|
142
|
+
toPlain(): Record<string, unknown>;
|
|
143
|
+
}
|
|
144
|
+
export declare class SellCarOptionsDTO extends PaginationOptions {
|
|
145
|
+
static fromPlain(plain: Record<string, unknown>): SellCarOptionsDTO;
|
|
146
|
+
toPlain(): Record<string, unknown>;
|
|
147
|
+
}
|
|
148
|
+
export declare class SellCarFetchDTO {
|
|
149
|
+
filter: SellCarFilterDTO;
|
|
150
|
+
options: SellCarOptionsDTO;
|
|
151
|
+
validate(): string[];
|
|
152
|
+
static fromPlain(plain: Record<string, unknown>): SellCarFetchDTO;
|
|
153
|
+
toPlain(): Record<string, unknown>;
|
|
154
|
+
}
|