@vibe-flats/booking-engine-common-server 1.0.157 → 1.0.159
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.
|
@@ -15,7 +15,7 @@ export interface UnitReview {
|
|
|
15
15
|
nativeRating?: number;
|
|
16
16
|
nativeScale?: 5 | 10;
|
|
17
17
|
createdAt: Date;
|
|
18
|
-
reservationId
|
|
18
|
+
reservationId?: string;
|
|
19
19
|
externalId: string;
|
|
20
20
|
platform: UnitReviewPlatform;
|
|
21
21
|
guest: GuestDocument;
|
|
@@ -30,7 +30,6 @@ export interface UnitRatingBucket {
|
|
|
30
30
|
}
|
|
31
31
|
export interface UnitRatingsByWindow {
|
|
32
32
|
allTime: UnitRatingBucket;
|
|
33
|
-
last6Months: UnitRatingBucket;
|
|
34
33
|
last3Reviews: UnitRatingBucket;
|
|
35
34
|
}
|
|
36
35
|
export interface UnitRatings {
|
|
@@ -44,7 +44,6 @@ const ratingBucketSchema = new mongoose_1.default.Schema({
|
|
|
44
44
|
}, { _id: false });
|
|
45
45
|
const ratingsByWindowSchema = new mongoose_1.default.Schema({
|
|
46
46
|
allTime: { type: ratingBucketSchema, required: true, default: () => ({}) },
|
|
47
|
-
last6Months: { type: ratingBucketSchema, required: true, default: () => ({}) },
|
|
48
47
|
last3Reviews: { type: ratingBucketSchema, required: true, default: () => ({}) }
|
|
49
48
|
}, { _id: false });
|
|
50
49
|
const schema = new mongoose_1.default.Schema({
|
|
@@ -177,7 +176,7 @@ const schema = new mongoose_1.default.Schema({
|
|
|
177
176
|
nativeRating: { type: Number, required: false },
|
|
178
177
|
nativeScale: { type: Number, enum: [5, 10], required: false },
|
|
179
178
|
createdAt: { type: Date, required: true },
|
|
180
|
-
reservationId: { type: String, required:
|
|
179
|
+
reservationId: { type: String, required: false },
|
|
181
180
|
externalId: { type: String, required: true },
|
|
182
181
|
platform: { type: String, required: true },
|
|
183
182
|
guest: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Guest', required: true },
|