Feat/SW-1519 remove deprecated hotel data from schema

* feat(SW-1519): Removed displayWebpage from hotel schema

* feat(SW-1519): Removed gallery from hotel schema

* feat(SW-1519): Removed conferencesAndMeetings from hotel schema

* feat(SW-1519): Removed healthAndWellness from hotel schema

* feat(SW-1519): Removed restaurantImages from hotel schema

* feat(SW-1519): Removed restaurantsOverviewPage from hotel schema


Approved-by: Fredrik Thorsson
Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-03-19 06:28:13 +00:00
parent 2fc33966ac
commit b2b197b1ef
15 changed files with 76 additions and 1701 deletions

View File

@@ -13,9 +13,6 @@ import { hotelContentSchema } from "./hotel/content"
import { detailedFacilitiesSchema } from "./hotel/detailedFacility"
import { hotelFactsSchema } from "./hotel/facts"
import { healthFacilitiesSchema } from "./hotel/healthFacilities"
import { displayWebPageSchema } from "./hotel/include/additionalData/displayWebPage"
import { facilitySchema } from "./hotel/include/additionalData/facility"
import { gallerySchema } from "./hotel/include/additionalData/gallery"
import { includeSchema } from "./hotel/include/include"
import { locationSchema } from "./hotel/location"
import { merchantInformationSchema } from "./hotel/merchantInformation"
@@ -31,17 +28,13 @@ export const attributesSchema = z.object({
address: addressSchema,
cityId: nullableStringValidator,
cityName: nullableStringValidator,
conferencesAndMeetings: facilitySchema.nullish(),
contactInformation: contactInformationSchema,
countryCode: nullableStringValidator,
detailedFacilities: detailedFacilitiesSchema,
displayWebPage: displayWebPageSchema,
gallery: gallerySchema.nullish(),
galleryImages: z
.array(imageSchema)
.nullish()
.transform((arr) => (arr ? arr.filter(Boolean) : [])),
healthAndWellness: facilitySchema.nullish(),
healthFacilities: healthFacilitiesSchema,
hotelContent: hotelContentSchema,
hotelFacts: hotelFactsSchema,
@@ -56,7 +49,6 @@ export const attributesSchema = z.object({
parking: nullableArrayObjectValidator(parkingSchema),
pointsOfInterest: pointOfInterestsSchema,
ratings: ratingsSchema,
restaurantImages: facilitySchema.nullish(),
rewardNight: rewardNightSchema,
socialMedia: socialMediaSchema,
specialAlerts: specialAlertsSchema,