fix: refacotr away optional pricing
This commit is contained in:
@@ -554,15 +554,14 @@ export const productTypePriceSchema = z.object({
|
||||
|
||||
const productSchema = z.object({
|
||||
productType: z.object({
|
||||
public: productTypePriceSchema.optional(),
|
||||
public: productTypePriceSchema,
|
||||
member: productTypePriceSchema.optional(),
|
||||
}),
|
||||
})
|
||||
|
||||
const roomConfigurationSchema = z.object({
|
||||
status: z.string(),
|
||||
// TODO: Remove the optional when the API change has been deployed
|
||||
roomTypeCode: z.string().optional(),
|
||||
roomTypeCode: z.string(),
|
||||
roomType: z.string(),
|
||||
roomsLeft: z.number(),
|
||||
features: z.array(
|
||||
@@ -825,17 +824,11 @@ export const apiLocationsSchema = z.object({
|
||||
),
|
||||
})
|
||||
|
||||
const breakfastPackagePriceSchema = z
|
||||
.object({
|
||||
currency: z.nativeEnum(CurrencyEnum),
|
||||
price: z.string(),
|
||||
totalPrice: z.string(),
|
||||
})
|
||||
.default({
|
||||
currency: CurrencyEnum.SEK,
|
||||
price: "0",
|
||||
totalPrice: "0",
|
||||
}) // TODO: Remove optional and default when the API change has been deployed
|
||||
const breakfastPackagePriceSchema = z.object({
|
||||
currency: z.nativeEnum(CurrencyEnum),
|
||||
price: z.string(),
|
||||
totalPrice: z.string(),
|
||||
})
|
||||
|
||||
export const breakfastPackageSchema = z.object({
|
||||
code: z.string(),
|
||||
|
||||
Reference in New Issue
Block a user