@alba-cars/common-modules 1.2.6 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/core/error-handling/errorHandler.d.ts +1 -1
  2. package/dist/core/error-handling/errorHandler.js +36 -10
  3. package/dist/core/models/index.d.ts +1 -0
  4. package/dist/core/models/index.js +1 -0
  5. package/dist/core/models/media/index.d.ts +1 -0
  6. package/dist/core/models/media/index.js +17 -0
  7. package/dist/core/models/media/media_data.d.ts +4 -0
  8. package/dist/core/models/media/media_data.js +2 -0
  9. package/dist/core/network/endpoint-config.d.ts +8 -1
  10. package/dist/core/network/endpoint-config.js +55 -6
  11. package/dist/core/network/fetch-api.js +24 -20
  12. package/dist/core/network/index.d.ts +0 -1
  13. package/dist/core/network/index.js +0 -1
  14. package/dist/core/network/react-query.d.ts +3 -9
  15. package/dist/core/utils/global_validators.d.ts +2 -0
  16. package/dist/core/utils/global_validators.js +20 -0
  17. package/dist/core/utils/index.d.ts +1 -0
  18. package/dist/core/utils/index.js +1 -0
  19. package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.d.ts +92 -0
  20. package/dist/features/finance-eligibilty-request/data/dto/FinanceEligibilityRequestDTO.js +286 -0
  21. package/dist/features/finance-eligibilty-request/data/index.d.ts +1 -0
  22. package/dist/features/finance-eligibilty-request/data/index.js +17 -0
  23. package/dist/features/finance-eligibilty-request/index.d.ts +1 -0
  24. package/dist/features/finance-eligibilty-request/index.js +17 -0
  25. package/dist/features/index.d.ts +7 -5
  26. package/dist/features/index.js +2 -0
  27. package/dist/features/sales-team/index.d.ts +0 -1
  28. package/dist/features/sales-team/index.js +0 -1
  29. package/dist/features/sell-call-request/data/dto/SellCarRequestDTO.d.ts +134 -0
  30. package/dist/features/sell-call-request/data/dto/SellCarRequestDTO.js +394 -0
  31. package/dist/features/sell-call-request/data/index.d.ts +1 -0
  32. package/dist/features/sell-call-request/data/index.js +17 -0
  33. package/dist/features/sell-call-request/index.d.ts +1 -0
  34. package/dist/features/sell-call-request/index.js +17 -0
  35. package/dist/features/showroom-visit/data/dto/ShowroomVisit.d.ts +27 -2
  36. package/dist/features/showroom-visit/data/dto/ShowroomVisit.js +86 -5
  37. package/dist/features/test-drive-request/data/dto/TestDriveRequestDTO.d.ts +9 -6
  38. package/dist/features/test-drive-request/data/dto/TestDriveRequestDTO.js +16 -3
  39. package/dist/features/vehicle/data/dto/MediaDTO.d.ts +5 -0
  40. package/dist/features/vehicle/data/dto/MediaDTO.js +2 -0
  41. package/dist/features/vehicle/data/dto/VehicleCategoryDTO.d.ts +39 -0
  42. package/dist/features/vehicle/data/dto/VehicleCategoryDTO.js +114 -0
  43. package/dist/features/vehicle/data/dto/VehicleDTO.d.ts +16 -8
  44. package/dist/features/vehicle/data/dto/VehicleDTO.js +43 -6
  45. package/dist/features/vehicle/data/dto/VehicleFilterDTO.d.ts +230 -0
  46. package/dist/features/vehicle/data/dto/VehicleFilterDTO.js +705 -0
  47. package/dist/features/vehicle/data/dto/VehicleFinanceDTO.d.ts +23 -12
  48. package/dist/features/vehicle/data/dto/VehicleFinanceDTO.js +41 -1
  49. package/dist/features/vehicle/data/dto/VehicleInspectionDTO.d.ts +147 -0
  50. package/dist/features/vehicle/data/dto/VehicleInspectionDTO.js +765 -0
  51. package/dist/features/vehicle/data/dto/VehicleMedia.d.ts +14 -0
  52. package/dist/features/vehicle/data/dto/VehicleMedia.js +29 -4
  53. package/dist/features/vehicle/data/dto/VehicleModelDTO.d.ts +5 -5
  54. package/dist/features/vehicle/data/dto/VehicleModelDTO.js +7 -7
  55. package/dist/features/vehicle/data/dto/VehicleTypeDTO.d.ts +1 -1
  56. package/dist/features/vehicle/data/dto/VehicleTypeDTO.js +1 -1
  57. package/dist/features/vehicle/data/dto/index.d.ts +5 -0
  58. package/dist/features/vehicle/data/dto/index.js +5 -0
  59. package/dist/features/vehicle/data/index.d.ts +0 -1
  60. package/dist/features/vehicle/data/index.js +1 -1
  61. package/dist/features/vehicle/data/models/VehicleFeature.d.ts +1 -0
  62. package/dist/features/vehicle/data/models/VehicleFeatureCategory.d.ts +1 -0
  63. package/dist/features/vehicle/data/models/VehicleFinance.d.ts +3 -0
  64. package/dist/features/vehicle/data/utilities.d.ts +32 -6
  65. package/dist/features/vehicle/data/utilities.js +1222 -19
  66. package/dist/features/vehicle/index.d.ts +0 -1
  67. package/dist/features/vehicle/index.js +0 -1
  68. package/dist/global/utilities.d.ts +4 -0
  69. package/dist/global/utilities.js +3 -1
  70. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  import { Request, Response, NextFunction } from "express";
2
2
  type AsyncFunction = (req: Request, res: Response, next: NextFunction) => Promise<any>;
3
- export declare function asyncHandler(fn: AsyncFunction): (req: Request, res: Response, next: NextFunction) => void;
3
+ export declare function asyncHandler(fn: AsyncFunction): (req: Request, res: Response, next: NextFunction) => Promise<void>;
4
4
  export declare function globalErrorHandlerMiddleware(err: Error, req: Request, res: Response, next: NextFunction): void;
5
5
  export {};
@@ -4,19 +4,45 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.globalErrorHandlerMiddleware = exports.asyncHandler = void 0;
5
5
  const AppError_1 = require("./AppError");
6
6
  function asyncHandler(fn) {
7
- return (req, res, next) => {
8
- Promise.resolve(fn(req, res, next)).catch((error) => {
9
- if (!(error instanceof AppError_1.AppError)) {
10
- error = AppError_1.AppError.internal("Internal Server Error");
11
- }
12
- res.status(error.statusCode).json({
7
+ return async (req, res, next) => {
8
+ try {
9
+ await fn(req, res, next);
10
+ }
11
+ catch (error) {
12
+ // Log the original error with stack trace
13
+ console.error("[Error Handler]", {
14
+ timestamp: new Date().toISOString(),
15
+ path: req.path,
16
+ method: req.method,
13
17
  error: {
14
- type: error.type,
15
- message: error.message,
16
- details: error.details,
18
+ name: error instanceof Error ? error.name : "Unknown Error",
19
+ message: error instanceof Error ? error.message : String(error),
20
+ stack: error instanceof Error ? error.stack : undefined,
17
21
  },
18
22
  });
19
- });
23
+ // Transform to AppError if needed
24
+ const appError = error instanceof AppError_1.AppError
25
+ ? error
26
+ : AppError_1.AppError.internal("Internal Server Error", error instanceof Error ? error.message : undefined);
27
+ // Log the transformed error response
28
+ console.info("[Error Response]", {
29
+ statusCode: appError.statusCode,
30
+ type: appError.type,
31
+ message: appError.message,
32
+ details: appError.details,
33
+ });
34
+ // Send error response
35
+ res.status(appError.statusCode).json({
36
+ error: {
37
+ type: appError.type,
38
+ message: appError.message,
39
+ details: appError.details,
40
+ ...(process.env.NODE_ENV === "development" && {
41
+ stack: appError.stack,
42
+ }),
43
+ },
44
+ });
45
+ }
20
46
  };
21
47
  }
22
48
  exports.asyncHandler = asyncHandler;
@@ -1 +1,2 @@
1
1
  export * from "./pagination";
2
+ export * from "./media";
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./pagination"), exports);
18
+ __exportStar(require("./media"), exports);
@@ -0,0 +1 @@
1
+ export * from "./media_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("./media_data"), exports);
@@ -0,0 +1,4 @@
1
+ export interface FileInput {
2
+ fileName: string;
3
+ fileType: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,13 +3,20 @@ interface BaseEndpoint {
3
3
  getAll: string | EndpointFunction;
4
4
  create: string | EndpointFunction;
5
5
  getOne: EndpointFunction;
6
+ getOneBySlug?: EndpointFunction;
6
7
  deleteOne: EndpointFunction;
7
8
  updateOne: EndpointFunction;
8
9
  }
9
10
  type ExtendedEndpoint = BaseEndpoint & {
10
11
  [key: string]: string | EndpointFunction;
11
12
  };
12
- type APIEndpointKeys = "vehicle" | "vehicleDetails" | "vehicleFinance" | "TestDrive" | "vehicleMake" | "vehicleModel" | "vehicleOrder" | "vehicleType" | "carOptions" | "payment" | "agents";
13
+ type APIEndpointKeys = "vehicle" | "vehicleDetails" | "vehicleFinance" | "TestDrive" | "vehicleMake" | "vehicleModel" | "vehicleMeta" | "vehicleInspection" | "vehicleOrder" | "vehicleType" | "carOptions" | "payment" | "agents" | "blogs" | "showroomVisit" | "sellCarRequest" | "financeEligibilityRequest";
13
14
  type APIEndpointType = Record<APIEndpointKeys, ExtendedEndpoint>;
14
15
  export declare const API_ENDPOINTS: APIEndpointType;
16
+ export declare const UTIL_ENDPOINTS: {
17
+ media: {
18
+ createS3Url: string;
19
+ preprocessMediaUrl: string;
20
+ };
21
+ };
15
22
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.API_ENDPOINTS = void 0;
3
+ exports.UTIL_ENDPOINTS = exports.API_ENDPOINTS = void 0;
4
4
  exports.API_ENDPOINTS = {
5
5
  vehicle: {
6
6
  getAll: `/vehicle`,
@@ -17,11 +17,11 @@ exports.API_ENDPOINTS = {
17
17
  updateOne: (id) => `/vehicledetails/${id}`,
18
18
  },
19
19
  vehicleFinance: {
20
- getAll: `/vehiclefinance`,
21
- create: `/vehiclefinance`,
22
- getOne: (id) => `/vehiclefinance/${id}`,
23
- deleteOne: (id) => `/vehiclefinance/${id}`,
24
- updateOne: (id) => `/vehiclefinance/${id}`,
20
+ getAll: `/vehicle-finance`,
21
+ create: `/vehicle-finance`,
22
+ getOne: (id) => `/vehicle-finance/${id}`,
23
+ deleteOne: (id) => `/vehicle-finance/${id}`,
24
+ updateOne: (id) => `/vehicle-finance/${id}`,
25
25
  },
26
26
  vehicleMake: {
27
27
  getAll: `/vehicle/makes`,
@@ -37,6 +37,13 @@ exports.API_ENDPOINTS = {
37
37
  deleteOne: (id) => `/vehicle/models/${id}`,
38
38
  updateOne: (id) => `/vehicle/models/${id}`,
39
39
  },
40
+ vehicleMeta: {
41
+ getAll: `/vehicle-meta-data`,
42
+ create: `/vehicle-meta-data`,
43
+ getOne: (id) => `/vehicle-meta-data/${id}`,
44
+ deleteOne: (id) => `/vehicle-meta-data/${id}`,
45
+ updateOne: (id) => `/vehicle-meta-data/${id}`,
46
+ },
40
47
  TestDrive: {
41
48
  getAll: `/test-drive-requests`,
42
49
  create: `/test-drive-requests`,
@@ -58,6 +65,13 @@ exports.API_ENDPOINTS = {
58
65
  deleteOne: (id) => `/vehicle/body-types/${id}`,
59
66
  updateOne: (id) => `/vehicle/body-types/${id}`,
60
67
  },
68
+ vehicleInspection: {
69
+ getAll: `/vehicle-inspection`,
70
+ create: `/vehicle-inspection`,
71
+ getOne: (id) => `/vehicle-inspection/${id}`,
72
+ deleteOne: (id) => `/vehicle-inspection/${id}`,
73
+ updateOne: (id) => `/vehicle-inspection/${id}`,
74
+ },
61
75
  carOptions: {
62
76
  getAll: `/caroptions`,
63
77
  create: `/caroptions`,
@@ -79,4 +93,39 @@ exports.API_ENDPOINTS = {
79
93
  deleteOne: (id) => `/salesagent/${id}`,
80
94
  updateOne: (id) => `/salesagent/${id}`,
81
95
  },
96
+ blogs: {
97
+ getAll: `/blog`,
98
+ create: `/blog`,
99
+ getOne: (id) => `/blog/${id}`,
100
+ getOneBySlug: (slug) => `/blog/slug/${slug}`,
101
+ deleteOne: (id) => `/blog/${id}`,
102
+ updateOne: (id) => `/blog/${id}`,
103
+ },
104
+ showroomVisit: {
105
+ getAll: `/showroomvisit`,
106
+ create: `/showroomvisit`,
107
+ getOne: (id) => `/showroomvisit/${id}`,
108
+ deleteOne: (id) => `/showroomvisit/${id}`,
109
+ updateOne: (id) => `/showroomvisit/${id}`,
110
+ },
111
+ sellCarRequest: {
112
+ getAll: `/sell-car-request`,
113
+ create: `/sell-car-request`,
114
+ getOne: (id) => `/sell-car-request/${id}`,
115
+ deleteOne: (id) => `/sell-car-request/${id}`,
116
+ updateOne: (id) => `/sell-car-request/${id}`,
117
+ },
118
+ financeEligibilityRequest: {
119
+ getAll: `/finance-eligibility-request`,
120
+ create: `/finance-eligibility-request`,
121
+ getOne: (id) => `/finance-eligibility-request/${id}`,
122
+ deleteOne: (id) => `/finance-eligibility-request/${id}`,
123
+ updateOne: (id) => `/finance-eligibility-request/${id}`,
124
+ },
125
+ };
126
+ exports.UTIL_ENDPOINTS = {
127
+ media: {
128
+ createS3Url: "/utils/get-upload-url",
129
+ preprocessMediaUrl: "/utils/process-media",
130
+ },
82
131
  };
@@ -13,7 +13,7 @@ async function apiRequest(endpoint, options = {}) {
13
13
  const headers = {
14
14
  Accept: "application/json",
15
15
  Authorization: `Bearer ${(0, utils_1.generateRandomBase64)(20)}`,
16
- 'Content-Type': 'application/json',
16
+ "Content-Type": "application/json",
17
17
  ...options.headers,
18
18
  };
19
19
  const config = {
@@ -24,42 +24,46 @@ async function apiRequest(endpoint, options = {}) {
24
24
  };
25
25
  options.method && options.method !== enums_1.HttpMethods.GET && console.log(config);
26
26
  try {
27
- options.method && options.method !== enums_1.HttpMethods.GET && console.log(`${BASE_URL}${endpoint}`);
27
+ options.method &&
28
+ options.method !== enums_1.HttpMethods.GET &&
29
+ console.log(`${BASE_URL}${endpoint}`);
28
30
  let url = `${BASE_URL}${endpoint}`;
29
31
  if (options.query && Object.keys(options.query).length > 0) {
30
32
  console.log("Raw params ", options.query);
31
33
  console.log("Stringified params = ", qs_1.default.stringify(options.query));
32
- url += `?${qs_1.default.stringify(options.query, { allowDots: true, arrayFormat: 'brackets', allowEmptyArrays: false, skipNulls: true })}`;
34
+ url += `?${qs_1.default.stringify(options.query, {
35
+ allowDots: true,
36
+ arrayFormat: "brackets",
37
+ allowEmptyArrays: false,
38
+ skipNulls: true,
39
+ })}`;
33
40
  }
34
41
  const response = await fetch(url, config);
35
42
  // Parse the response once and store it
36
- const contentType = response.headers.get('content-type');
37
- let responseData;
38
- if (contentType && contentType.includes("application/json")) {
39
- responseData = await response.json();
40
- }
41
- else {
42
- responseData = await response.text();
43
- }
43
+ const contentType = response.headers.get("content-type");
44
+ let responseData = contentType && contentType.includes("application/json")
45
+ ? await response.json()
46
+ : await response.text();
44
47
  // Log for non-GET requests
45
- options.method && options.method !== enums_1.HttpMethods.GET && console.log(responseData);
48
+ options.method &&
49
+ options.method !== enums_1.HttpMethods.GET &&
50
+ console.log(responseData);
46
51
  if (!response.ok) {
52
+ const error = new Error(typeof responseData === "object"
53
+ ? responseData.message || "API Error"
54
+ : "API Error");
55
+ error.status = response.status;
56
+ error.data = responseData;
47
57
  if (response.status === enums_1.HttpStatusCodes.UNAUTHORIZED) {
48
58
  // TODO: redirect to login page
49
59
  }
50
- if (contentType && contentType.includes("application/json")) {
51
- return responseData;
52
- }
53
- else {
54
- console.error('Received non-JSON response:', responseData);
55
- throw new Error('Invalid response format');
56
- }
60
+ throw error;
57
61
  }
58
62
  // Return the already parsed response
59
63
  return responseData;
60
64
  }
61
65
  catch (error) {
62
- console.log(error, 'ERROR DATA---');
66
+ console.log(error, "ERROR DATA---");
63
67
  return Promise.reject(error);
64
68
  }
65
69
  }
@@ -1,4 +1,3 @@
1
1
  export * from "./api-client";
2
2
  export * from "./endpoint-config";
3
3
  export * from "./fetch-api";
4
- export * from './react-query';
@@ -17,4 +17,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./api-client"), exports);
18
18
  __exportStar(require("./endpoint-config"), exports);
19
19
  __exportStar(require("./fetch-api"), exports);
20
- __exportStar(require("./react-query"), exports);
@@ -1,12 +1,6 @@
1
- import { QueryClient, UseMutationOptions } from "@tanstack/react-query";
2
- export declare const queryConfig: {
3
- queries: {
4
- refetchOnWindowFocus: false;
5
- retry: false;
6
- staleTime: number;
7
- };
8
- };
9
- export declare const queryClient: QueryClient;
1
+ import { UseMutationOptions } from "@tanstack/react-query";
2
+ export declare const queryConfig: DefaultOptions;
3
+ export declare const queryClient: any;
10
4
  export type ApiFnReturnType<FnType extends (..._args: any) => Promise<any>> = Awaited<ReturnType<FnType>>;
11
5
  export type QueryConfig<T extends (..._args: any[]) => any> = Omit<ReturnType<T>, "queryKey" | "queryFn">;
12
6
  export type MutationConfig<MutationFnType extends (..._args: any) => Promise<any>> = UseMutationOptions<ApiFnReturnType<MutationFnType>, Error, Parameters<MutationFnType>[0]>;
@@ -0,0 +1,2 @@
1
+ export declare const validateChassisNumber: (value: string) => true | "Invalid Chassis Number";
2
+ export declare const validateVIN: (value: string) => true | "Invalid VIN format";
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateVIN = exports.validateChassisNumber = void 0;
4
+ const validateChassisNumber = (value) => {
5
+ const chassisRegex = /^[A-HJ-NPR-Z0-9]{15,20}$/; // Valid alphanumerics excluding I, O, Q
6
+ if (!chassisRegex.test(value)) {
7
+ return "Invalid Chassis Number";
8
+ }
9
+ return true; // If valid, return true
10
+ };
11
+ exports.validateChassisNumber = validateChassisNumber;
12
+ const validateVIN = (value) => {
13
+ // Regex to exclude I, O, Q and check for VIN's valid structure
14
+ const vinRegex = /^[A-HJ-NPR-Z0-9]{17}$/;
15
+ if (!vinRegex.test(value)) {
16
+ return "Invalid VIN format";
17
+ }
18
+ return true; // Validation passed
19
+ };
20
+ exports.validateVIN = validateVIN;
@@ -1,2 +1,3 @@
1
1
  export * from "./global-utils";
2
2
  export * from "./global-constants";
3
+ export * from "./global_validators";
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./global-utils"), exports);
18
18
  __exportStar(require("./global-constants"), exports);
19
+ __exportStar(require("./global_validators"), exports);
@@ -0,0 +1,92 @@
1
+ export declare enum SalaryType {
2
+ BANK_TRANSFER = "bank_transfer",
3
+ CASH = "cash",
4
+ OTHER = "other"
5
+ }
6
+ export declare enum EmployeeCount {
7
+ LESS_THAN_10 = "less_than_10",
8
+ BETWEEN_10_50 = "between_10_50",
9
+ MORE_THAN_50 = "more_than_50"
10
+ }
11
+ export declare enum YesNo {
12
+ YES = "yes",
13
+ NO = "no"
14
+ }
15
+ export declare class FinanceEligibilityRequestCreateDTO {
16
+ vehicleId?: string;
17
+ makeId: string;
18
+ modelId: string;
19
+ fullName: string;
20
+ email: string;
21
+ contactNumber: string;
22
+ currentSalary: number;
23
+ existingLoans: YesNo;
24
+ hasCreditScore: YesNo;
25
+ salaryType: SalaryType;
26
+ previousDisputes: YesNo;
27
+ employeeCount: EmployeeCount;
28
+ hasLandline: YesNo;
29
+ documents?: string[];
30
+ validate(): string[];
31
+ static fromPlain(plain: Record<string, unknown>): FinanceEligibilityRequestCreateDTO;
32
+ toPlain(): Record<string, unknown>;
33
+ }
34
+ export declare class FinanceEligibilityRequestUpdateDTO {
35
+ vehicleId?: string;
36
+ makeId?: string;
37
+ modelId?: string;
38
+ fullName?: string;
39
+ email?: string;
40
+ contactNumber?: string;
41
+ currentSalary?: number;
42
+ existingLoans?: YesNo;
43
+ hasCreditScore?: YesNo;
44
+ salaryType?: SalaryType;
45
+ previousDisputes?: YesNo;
46
+ employeeCount?: EmployeeCount;
47
+ hasLandline?: YesNo;
48
+ documents?: string[];
49
+ status?: "pending" | "approved" | "rejected";
50
+ rejectionReason?: string;
51
+ validate(): string[];
52
+ static fromPlain(plain: Record<string, unknown>): FinanceEligibilityRequestUpdateDTO;
53
+ toPlain(): Record<string, unknown>;
54
+ }
55
+ export declare class FinanceEligibilityRequestResponseDTO {
56
+ id: string;
57
+ vehicleId: string;
58
+ vehicle?: {
59
+ id: string;
60
+ make: string;
61
+ model: string;
62
+ year: number;
63
+ };
64
+ makeId: string;
65
+ modelId: string;
66
+ make?: {
67
+ id: string;
68
+ name: string;
69
+ };
70
+ model?: {
71
+ id: string;
72
+ name: string;
73
+ };
74
+ fullName: string;
75
+ email: string;
76
+ contactNumber: string;
77
+ currentSalary: number;
78
+ existingLoans: YesNo;
79
+ hasCreditScore: YesNo;
80
+ salaryType: SalaryType;
81
+ previousDisputes: YesNo;
82
+ employeeCount: EmployeeCount;
83
+ hasLandline: YesNo;
84
+ documents: string[];
85
+ status: "pending" | "approved" | "rejected";
86
+ rejectionReason?: string;
87
+ createdAt: Date;
88
+ updatedAt: Date;
89
+ validate(): string[];
90
+ static fromPlain(plain: Record<string, unknown>): FinanceEligibilityRequestResponseDTO;
91
+ toPlain(): Record<string, unknown>;
92
+ }