@alba-cars/common-modules 1.5.5 → 1.5.6
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 +1 -0
- package/dist/core/network/endpoint-config.js +7 -0
- package/dist/features/google-review/data/dto/google_review_dto.d.ts +42 -0
- package/dist/features/google-review/data/dto/google_review_dto.js +186 -0
- package/dist/features/google-review/data/dto/index.d.ts +2 -2
- package/dist/features/google-review/data/dto/index.js +8 -0
- package/dist/features/lead/data/dto/lead_dto.d.ts +2 -0
- package/dist/features/lead/data/dto/lead_dto.js +7 -0
- package/dist/features/lead/data/dto/lead_prefernce_dto.d.ts +14 -0
- package/dist/features/lead/data/dto/lead_prefernce_dto.js +61 -1
- package/dist/features/vehicle-reservations/data/dto/VehicleReservationDTO.d.ts +2 -2
- package/dist/features/vehicle-reservations/data/dto/VehicleReservationDTO.js +2 -2
- package/package.json +1 -1
|
@@ -173,6 +173,13 @@ exports.API_ENDPOINTS = {
|
|
|
173
173
|
deleteOne: (id) => `/languages/${id}`,
|
|
174
174
|
updateOne: (id) => `/languages/${id}`,
|
|
175
175
|
},
|
|
176
|
+
googleReview: {
|
|
177
|
+
getAll: `/google-reviews`,
|
|
178
|
+
create: `/google-reviews`,
|
|
179
|
+
getOne: (id) => `/google-reviews/${id}`,
|
|
180
|
+
deleteOne: (id) => `/google-reviews/${id}`,
|
|
181
|
+
updateOne: (id) => `/google-reviews/${id}`,
|
|
182
|
+
},
|
|
176
183
|
};
|
|
177
184
|
exports.UTIL_ENDPOINTS = {
|
|
178
185
|
media: {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ReviewPlatform } from '../enums';
|
|
2
|
+
export declare class GoogleReviewDTO {
|
|
3
|
+
authorName: string;
|
|
4
|
+
authorUrl?: string;
|
|
5
|
+
profilePhotoUrl?: string;
|
|
6
|
+
rating: number;
|
|
7
|
+
text: string;
|
|
8
|
+
time: number;
|
|
9
|
+
relativeTimeDescription?: string;
|
|
10
|
+
placeId: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class FetchGoogleReviewsDTO {
|
|
13
|
+
placeId: string;
|
|
14
|
+
fetch: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class SaveGoogleReviewDTO {
|
|
17
|
+
username: string;
|
|
18
|
+
rating: number;
|
|
19
|
+
comment: string;
|
|
20
|
+
date: Date;
|
|
21
|
+
showPublic?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare class GoogleReviewResponseDTO {
|
|
24
|
+
success: boolean;
|
|
25
|
+
message: string;
|
|
26
|
+
data: GoogleReviewDTO[];
|
|
27
|
+
}
|
|
28
|
+
export declare class ReviewGetDTO {
|
|
29
|
+
placeId?: string;
|
|
30
|
+
platform?: ReviewPlatform;
|
|
31
|
+
comment?: string;
|
|
32
|
+
username?: string;
|
|
33
|
+
showPublic?: boolean;
|
|
34
|
+
minRating?: number;
|
|
35
|
+
maxRating?: number;
|
|
36
|
+
skip?: number;
|
|
37
|
+
take?: number;
|
|
38
|
+
}
|
|
39
|
+
export declare class UpdateReviewShowPublicDTO {
|
|
40
|
+
id: string;
|
|
41
|
+
showPublic: boolean;
|
|
42
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
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.UpdateReviewShowPublicDTO = exports.ReviewGetDTO = exports.GoogleReviewResponseDTO = exports.SaveGoogleReviewDTO = exports.FetchGoogleReviewsDTO = exports.GoogleReviewDTO = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const enums_1 = require("../enums");
|
|
16
|
+
class GoogleReviewDTO {
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsString)(),
|
|
20
|
+
(0, class_validator_1.Length)(1, 100),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], GoogleReviewDTO.prototype, "authorName", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsUrl)(),
|
|
25
|
+
(0, class_validator_1.IsOptional)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], GoogleReviewDTO.prototype, "authorUrl", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsUrl)(),
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], GoogleReviewDTO.prototype, "profilePhotoUrl", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsNumber)(),
|
|
35
|
+
(0, class_validator_1.Min)(1),
|
|
36
|
+
(0, class_validator_1.Max)(5),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], GoogleReviewDTO.prototype, "rating", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
41
|
+
(0, class_validator_1.Length)(1, 1000),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], GoogleReviewDTO.prototype, "text", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsNumber)(),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], GoogleReviewDTO.prototype, "time", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsString)(),
|
|
50
|
+
(0, class_validator_1.IsOptional)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], GoogleReviewDTO.prototype, "relativeTimeDescription", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsString)(),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], GoogleReviewDTO.prototype, "placeId", void 0);
|
|
57
|
+
exports.GoogleReviewDTO = GoogleReviewDTO;
|
|
58
|
+
class FetchGoogleReviewsDTO {
|
|
59
|
+
constructor() {
|
|
60
|
+
this.fetch = false;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_validator_1.IsString)(),
|
|
65
|
+
(0, class_validator_1.Length)(1, 100),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], FetchGoogleReviewsDTO.prototype, "placeId", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, class_validator_1.IsBoolean)(),
|
|
70
|
+
(0, class_validator_1.IsOptional)(),
|
|
71
|
+
__metadata("design:type", Boolean)
|
|
72
|
+
], FetchGoogleReviewsDTO.prototype, "fetch", void 0);
|
|
73
|
+
exports.FetchGoogleReviewsDTO = FetchGoogleReviewsDTO;
|
|
74
|
+
class SaveGoogleReviewDTO {
|
|
75
|
+
constructor() {
|
|
76
|
+
this.showPublic = true;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, class_validator_1.IsString)(),
|
|
81
|
+
(0, class_validator_1.Length)(1, 100),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], SaveGoogleReviewDTO.prototype, "username", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, class_validator_1.IsNumber)(),
|
|
86
|
+
(0, class_validator_1.Min)(1),
|
|
87
|
+
(0, class_validator_1.Max)(5),
|
|
88
|
+
__metadata("design:type", Number)
|
|
89
|
+
], SaveGoogleReviewDTO.prototype, "rating", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, class_validator_1.IsString)(),
|
|
92
|
+
(0, class_validator_1.Length)(1, 1000),
|
|
93
|
+
__metadata("design:type", String)
|
|
94
|
+
], SaveGoogleReviewDTO.prototype, "comment", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, class_transformer_1.Type)(() => Date),
|
|
97
|
+
(0, class_validator_1.IsDate)(),
|
|
98
|
+
__metadata("design:type", Date)
|
|
99
|
+
], SaveGoogleReviewDTO.prototype, "date", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, class_validator_1.IsBoolean)(),
|
|
102
|
+
(0, class_validator_1.IsOptional)(),
|
|
103
|
+
__metadata("design:type", Boolean)
|
|
104
|
+
], SaveGoogleReviewDTO.prototype, "showPublic", void 0);
|
|
105
|
+
exports.SaveGoogleReviewDTO = SaveGoogleReviewDTO;
|
|
106
|
+
class GoogleReviewResponseDTO {
|
|
107
|
+
}
|
|
108
|
+
exports.GoogleReviewResponseDTO = GoogleReviewResponseDTO;
|
|
109
|
+
class ReviewGetDTO {
|
|
110
|
+
}
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, class_validator_1.IsString)(),
|
|
113
|
+
(0, class_validator_1.IsOptional)(),
|
|
114
|
+
__metadata("design:type", String)
|
|
115
|
+
], ReviewGetDTO.prototype, "placeId", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, class_validator_1.IsEnum)(enums_1.ReviewPlatform),
|
|
118
|
+
(0, class_validator_1.IsOptional)(),
|
|
119
|
+
__metadata("design:type", String)
|
|
120
|
+
], ReviewGetDTO.prototype, "platform", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, class_validator_1.IsString)(),
|
|
123
|
+
(0, class_validator_1.IsOptional)(),
|
|
124
|
+
__metadata("design:type", String)
|
|
125
|
+
], ReviewGetDTO.prototype, "comment", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, class_validator_1.IsString)(),
|
|
128
|
+
(0, class_validator_1.IsOptional)(),
|
|
129
|
+
__metadata("design:type", String)
|
|
130
|
+
], ReviewGetDTO.prototype, "username", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, class_validator_1.IsBoolean)(),
|
|
133
|
+
(0, class_validator_1.IsOptional)(),
|
|
134
|
+
(0, class_transformer_1.Transform)(({ value }) => {
|
|
135
|
+
if (value === 'true')
|
|
136
|
+
return true;
|
|
137
|
+
if (value === 'false')
|
|
138
|
+
return false;
|
|
139
|
+
return value;
|
|
140
|
+
}),
|
|
141
|
+
__metadata("design:type", Boolean)
|
|
142
|
+
], ReviewGetDTO.prototype, "showPublic", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
(0, class_validator_1.IsNumber)(),
|
|
145
|
+
(0, class_validator_1.IsOptional)(),
|
|
146
|
+
(0, class_validator_1.Min)(1),
|
|
147
|
+
(0, class_validator_1.Max)(5),
|
|
148
|
+
(0, class_transformer_1.Transform)(({ value }) => value ? Number(value) : undefined),
|
|
149
|
+
__metadata("design:type", Number)
|
|
150
|
+
], ReviewGetDTO.prototype, "minRating", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, class_validator_1.IsNumber)(),
|
|
153
|
+
(0, class_validator_1.IsOptional)(),
|
|
154
|
+
(0, class_validator_1.Min)(1),
|
|
155
|
+
(0, class_validator_1.Max)(5),
|
|
156
|
+
(0, class_transformer_1.Transform)(({ value }) => value ? Number(value) : undefined),
|
|
157
|
+
__metadata("design:type", Number)
|
|
158
|
+
], ReviewGetDTO.prototype, "maxRating", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
(0, class_validator_1.IsNumber)(),
|
|
161
|
+
(0, class_validator_1.IsOptional)(),
|
|
162
|
+
(0, class_validator_1.Min)(0),
|
|
163
|
+
(0, class_transformer_1.Transform)(({ value }) => value ? Number(value) : undefined),
|
|
164
|
+
__metadata("design:type", Number)
|
|
165
|
+
], ReviewGetDTO.prototype, "skip", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, class_validator_1.IsNumber)(),
|
|
168
|
+
(0, class_validator_1.IsOptional)(),
|
|
169
|
+
(0, class_validator_1.Min)(1),
|
|
170
|
+
(0, class_transformer_1.Transform)(({ value }) => value ? Number(value) : undefined),
|
|
171
|
+
__metadata("design:type", Number)
|
|
172
|
+
], ReviewGetDTO.prototype, "take", void 0);
|
|
173
|
+
exports.ReviewGetDTO = ReviewGetDTO;
|
|
174
|
+
class UpdateReviewShowPublicDTO {
|
|
175
|
+
}
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, class_validator_1.IsString)(),
|
|
178
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
179
|
+
__metadata("design:type", String)
|
|
180
|
+
], UpdateReviewShowPublicDTO.prototype, "id", void 0);
|
|
181
|
+
__decorate([
|
|
182
|
+
(0, class_validator_1.IsBoolean)(),
|
|
183
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
184
|
+
__metadata("design:type", Boolean)
|
|
185
|
+
], UpdateReviewShowPublicDTO.prototype, "showPublic", void 0);
|
|
186
|
+
exports.UpdateReviewShowPublicDTO = UpdateReviewShowPublicDTO;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { GoogleReviewDTO, FetchGoogleReviewsDTO, SaveGoogleReviewDTO, GoogleReviewResponseDTO, ReviewGetDTO, UpdateReviewShowPublicDTO } from "./google_review_dto";
|
|
2
|
+
export { GoogleReviewDTO, FetchGoogleReviewsDTO, SaveGoogleReviewDTO, GoogleReviewResponseDTO, ReviewGetDTO, UpdateReviewShowPublicDTO };
|
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateReviewShowPublicDTO = exports.ReviewGetDTO = exports.GoogleReviewResponseDTO = exports.SaveGoogleReviewDTO = exports.FetchGoogleReviewsDTO = exports.GoogleReviewDTO = void 0;
|
|
4
|
+
const google_review_dto_1 = require("./google_review_dto");
|
|
5
|
+
Object.defineProperty(exports, "GoogleReviewDTO", { enumerable: true, get: function () { return google_review_dto_1.GoogleReviewDTO; } });
|
|
6
|
+
Object.defineProperty(exports, "FetchGoogleReviewsDTO", { enumerable: true, get: function () { return google_review_dto_1.FetchGoogleReviewsDTO; } });
|
|
7
|
+
Object.defineProperty(exports, "SaveGoogleReviewDTO", { enumerable: true, get: function () { return google_review_dto_1.SaveGoogleReviewDTO; } });
|
|
8
|
+
Object.defineProperty(exports, "GoogleReviewResponseDTO", { enumerable: true, get: function () { return google_review_dto_1.GoogleReviewResponseDTO; } });
|
|
9
|
+
Object.defineProperty(exports, "ReviewGetDTO", { enumerable: true, get: function () { return google_review_dto_1.ReviewGetDTO; } });
|
|
10
|
+
Object.defineProperty(exports, "UpdateReviewShowPublicDTO", { enumerable: true, get: function () { return google_review_dto_1.UpdateReviewShowPublicDTO; } });
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
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
|
+
import { LeadPreferencesCreateDTO } from "./lead_prefernce_dto";
|
|
4
5
|
import { TypedFilter, TypedOptions } from "../../../../global/utilities";
|
|
5
6
|
import { BaseGetDTO } from "../../../../global";
|
|
6
7
|
import { Deposit } from "../../../models/Deposit";
|
|
@@ -73,6 +74,7 @@ export declare class LeadCreateDTO {
|
|
|
73
74
|
lastContactDate?: Date;
|
|
74
75
|
lastContactType?: string;
|
|
75
76
|
totalInteractions?: number;
|
|
77
|
+
preference?: LeadPreferencesCreateDTO;
|
|
76
78
|
validate(): string[];
|
|
77
79
|
static fromPlain(plain: Record<string, unknown>): LeadCreateDTO;
|
|
78
80
|
toPlain(): Record<string, unknown>;
|
|
@@ -14,6 +14,7 @@ const class_validator_1 = require("class-validator");
|
|
|
14
14
|
const lead_status_type_1 = require("../enum/lead_status_type");
|
|
15
15
|
const lead_source_status_types_1 = require("../enum/lead_source_status_types");
|
|
16
16
|
const lead_prefernce_dto_1 = require("./lead_prefernce_dto");
|
|
17
|
+
const lead_prefernce_dto_2 = require("./lead_prefernce_dto");
|
|
17
18
|
const class_transformer_1 = require("class-transformer");
|
|
18
19
|
const utilities_1 = require("../../../../global/utilities");
|
|
19
20
|
const global_1 = require("../../../../global");
|
|
@@ -331,6 +332,12 @@ __decorate([
|
|
|
331
332
|
(0, class_validator_1.IsOptional)(),
|
|
332
333
|
__metadata("design:type", Number)
|
|
333
334
|
], LeadCreateDTO.prototype, "totalInteractions", void 0);
|
|
335
|
+
__decorate([
|
|
336
|
+
(0, class_validator_1.ValidateNested)(),
|
|
337
|
+
(0, class_transformer_1.Type)(() => lead_prefernce_dto_2.LeadPreferencesCreateDTO),
|
|
338
|
+
(0, class_validator_1.IsOptional)(),
|
|
339
|
+
__metadata("design:type", lead_prefernce_dto_2.LeadPreferencesCreateDTO)
|
|
340
|
+
], LeadCreateDTO.prototype, "preference", void 0);
|
|
334
341
|
exports.LeadCreateDTO = LeadCreateDTO;
|
|
335
342
|
class LeadFilter extends utilities_1.TypedFilter {
|
|
336
343
|
}
|
|
@@ -29,6 +29,20 @@ export declare class LeadPreferencesUpdateDTO {
|
|
|
29
29
|
static fromPlain(plain: Record<string, unknown>): LeadPreferencesUpdateDTO;
|
|
30
30
|
toPlain(): Record<string, unknown>;
|
|
31
31
|
}
|
|
32
|
+
export declare class LeadPreferencesCreateDTO {
|
|
33
|
+
budgetMin?: number;
|
|
34
|
+
budgetMax?: number;
|
|
35
|
+
preferredMake?: string;
|
|
36
|
+
preferredModel?: string;
|
|
37
|
+
preferredYearMin?: number;
|
|
38
|
+
preferredYearMax?: number;
|
|
39
|
+
preferredColors?: string[];
|
|
40
|
+
preferredFeatures?: string[];
|
|
41
|
+
additionalPreferences?: string;
|
|
42
|
+
validate(): string[];
|
|
43
|
+
static fromPlain(plain: Record<string, unknown>): LeadPreferencesCreateDTO;
|
|
44
|
+
toPlain(): Record<string, unknown>;
|
|
45
|
+
}
|
|
32
46
|
export declare class LeadPreferencesFilter extends TypedFilter {
|
|
33
47
|
id?: string | string[];
|
|
34
48
|
budgetRange?: Range;
|
|
@@ -9,7 +9,7 @@ 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.LeadPreferencesGetDTO = exports.LeadPreferencesFilter = exports.LeadPreferencesUpdateDTO = exports.LeadPreferencesDTO = void 0;
|
|
12
|
+
exports.LeadPreferencesGetDTO = exports.LeadPreferencesFilter = exports.LeadPreferencesCreateDTO = exports.LeadPreferencesUpdateDTO = exports.LeadPreferencesDTO = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const global_1 = require("../../../../global");
|
|
@@ -138,6 +138,66 @@ __decorate([
|
|
|
138
138
|
__metadata("design:type", String)
|
|
139
139
|
], LeadPreferencesUpdateDTO.prototype, "additionalPreferences", void 0);
|
|
140
140
|
exports.LeadPreferencesUpdateDTO = LeadPreferencesUpdateDTO;
|
|
141
|
+
class LeadPreferencesCreateDTO {
|
|
142
|
+
validate() {
|
|
143
|
+
const errors = (0, class_validator_1.validateSync)(this);
|
|
144
|
+
return errors.map((error) => { var _a; return Object.values((_a = error.constraints) !== null && _a !== void 0 ? _a : {}); }).flat();
|
|
145
|
+
}
|
|
146
|
+
static fromPlain(plain) {
|
|
147
|
+
return (0, class_transformer_1.plainToClass)(LeadPreferencesCreateDTO, plain);
|
|
148
|
+
}
|
|
149
|
+
toPlain() {
|
|
150
|
+
return (0, class_transformer_1.classToPlain)(this);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, class_validator_1.IsOptional)(),
|
|
155
|
+
(0, class_validator_1.IsNumber)(),
|
|
156
|
+
__metadata("design:type", Number)
|
|
157
|
+
], LeadPreferencesCreateDTO.prototype, "budgetMin", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
(0, class_validator_1.IsOptional)(),
|
|
160
|
+
(0, class_validator_1.IsNumber)(),
|
|
161
|
+
__metadata("design:type", Number)
|
|
162
|
+
], LeadPreferencesCreateDTO.prototype, "budgetMax", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, class_validator_1.IsOptional)(),
|
|
165
|
+
(0, class_validator_1.IsString)(),
|
|
166
|
+
__metadata("design:type", String)
|
|
167
|
+
], LeadPreferencesCreateDTO.prototype, "preferredMake", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, class_validator_1.IsOptional)(),
|
|
170
|
+
(0, class_validator_1.IsString)(),
|
|
171
|
+
__metadata("design:type", String)
|
|
172
|
+
], LeadPreferencesCreateDTO.prototype, "preferredModel", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
(0, class_validator_1.IsOptional)(),
|
|
175
|
+
(0, class_validator_1.IsNumber)(),
|
|
176
|
+
__metadata("design:type", Number)
|
|
177
|
+
], LeadPreferencesCreateDTO.prototype, "preferredYearMin", void 0);
|
|
178
|
+
__decorate([
|
|
179
|
+
(0, class_validator_1.IsOptional)(),
|
|
180
|
+
(0, class_validator_1.IsNumber)(),
|
|
181
|
+
__metadata("design:type", Number)
|
|
182
|
+
], LeadPreferencesCreateDTO.prototype, "preferredYearMax", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
(0, class_validator_1.IsOptional)(),
|
|
185
|
+
(0, class_validator_1.IsArray)(),
|
|
186
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
187
|
+
__metadata("design:type", Array)
|
|
188
|
+
], LeadPreferencesCreateDTO.prototype, "preferredColors", void 0);
|
|
189
|
+
__decorate([
|
|
190
|
+
(0, class_validator_1.IsOptional)(),
|
|
191
|
+
(0, class_validator_1.IsArray)(),
|
|
192
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
193
|
+
__metadata("design:type", Array)
|
|
194
|
+
], LeadPreferencesCreateDTO.prototype, "preferredFeatures", void 0);
|
|
195
|
+
__decorate([
|
|
196
|
+
(0, class_validator_1.IsOptional)(),
|
|
197
|
+
(0, class_validator_1.IsString)(),
|
|
198
|
+
__metadata("design:type", String)
|
|
199
|
+
], LeadPreferencesCreateDTO.prototype, "additionalPreferences", void 0);
|
|
200
|
+
exports.LeadPreferencesCreateDTO = LeadPreferencesCreateDTO;
|
|
141
201
|
class LeadPreferencesFilter extends global_1.TypedFilter {
|
|
142
202
|
}
|
|
143
203
|
__decorate([
|
|
@@ -2,10 +2,10 @@ import { FinanceType } from "../enums/finance-type";
|
|
|
2
2
|
import { ReservationStatus } from "../enums/reservation-type";
|
|
3
3
|
import { Vehicle } from "../../../vehicle/data";
|
|
4
4
|
import { PaginationOptions } from "../../../../global";
|
|
5
|
-
import { LeadDTO } from "../../../lead/data/dto/lead_dto";
|
|
5
|
+
import { LeadCreateDTO, LeadDTO } from "../../../lead/data/dto/lead_dto";
|
|
6
6
|
export declare class CreateVehicleReservationDto {
|
|
7
7
|
leadId?: string;
|
|
8
|
-
newLead?:
|
|
8
|
+
newLead?: LeadCreateDTO;
|
|
9
9
|
vehicleId: string;
|
|
10
10
|
financeType: FinanceType;
|
|
11
11
|
depositAmount?: number;
|
|
@@ -35,9 +35,9 @@ __decorate([
|
|
|
35
35
|
], CreateVehicleReservationDto.prototype, "leadId", void 0);
|
|
36
36
|
__decorate([
|
|
37
37
|
(0, class_validator_1.ValidateNested)(),
|
|
38
|
-
(0, class_transformer_1.Type)(() => lead_dto_1.
|
|
38
|
+
(0, class_transformer_1.Type)(() => lead_dto_1.LeadCreateDTO),
|
|
39
39
|
(0, class_validator_1.ValidateIf)((o) => !o.leadId),
|
|
40
|
-
__metadata("design:type", lead_dto_1.
|
|
40
|
+
__metadata("design:type", lead_dto_1.LeadCreateDTO)
|
|
41
41
|
], CreateVehicleReservationDto.prototype, "newLead", void 0);
|
|
42
42
|
__decorate([
|
|
43
43
|
(0, class_validator_1.IsUUID)(),
|
package/package.json
CHANGED