Feat/SW-1449 destination page * feat(SW-1449): Added destination country page * feat(SW-1449): added destination city page Approved-by: Fredrik Thorsson Approved-by: Matilda Landström
26 lines
764 B
TypeScript
26 lines
764 B
TypeScript
import { z } from "zod"
|
|
|
|
const bookingWidgetToggleSchema = z
|
|
.object({
|
|
page_settings: z.object({
|
|
hide_booking_widget: z.boolean(),
|
|
}),
|
|
})
|
|
.optional()
|
|
|
|
export const validateBookingWidgetToggleSchema = z.object({
|
|
account_page: bookingWidgetToggleSchema,
|
|
collection_page: bookingWidgetToggleSchema,
|
|
content_page: bookingWidgetToggleSchema,
|
|
current_blocks_page: bookingWidgetToggleSchema,
|
|
destination_overview_page: bookingWidgetToggleSchema,
|
|
destination_country_page: bookingWidgetToggleSchema,
|
|
destination_city_page: bookingWidgetToggleSchema,
|
|
hotel_page: bookingWidgetToggleSchema,
|
|
loyalty_page: bookingWidgetToggleSchema,
|
|
})
|
|
|
|
export type ValidateBookingWidgetToggleType = z.infer<
|
|
typeof validateBookingWidgetToggleSchema
|
|
>
|