26 lines
840 B
TypeScript
26 lines
840 B
TypeScript
import { z } from "zod"
|
|
|
|
import { transformedImageVaultAssetSchema } from "@scandic-hotels/common/utils/imageVault"
|
|
|
|
import { CardsEnum } from "../../../../../types/cardsEnum"
|
|
import { systemSchema } from "../../system"
|
|
import { buttonSchema } from "../utils/buttonLinkSchema"
|
|
import { linkConnectionRefsSchema } from "../utils/linkConnection"
|
|
|
|
export const loyaltyCardBlockSchema = z.object({
|
|
__typename: z.literal(CardsEnum.LoyaltyCard),
|
|
body_text: z.string().optional(),
|
|
heading: z.string().optional().default(""),
|
|
// JSON - ImageVault Image
|
|
image: transformedImageVaultAssetSchema,
|
|
link: buttonSchema,
|
|
system: systemSchema,
|
|
title: z.string().optional(),
|
|
})
|
|
|
|
export const loyaltyCardBlockRefsSchema = z.object({
|
|
__typename: z.literal(CardsEnum.LoyaltyCard),
|
|
link: linkConnectionRefsSchema,
|
|
system: systemSchema,
|
|
})
|