Files
web/packages/trpc/lib/routers/contentstack/schemas/blocks/cards/loyaltyCard.ts
Linus Flood 5fc93472f4 Merged in feat/rework-contentstack (pull request #3493)
Feat(SW-3708): refactor contentstack fetching (removing all refs) and cache invalidation

* Remove all REFS

* Revalidate correct language

* PR fixes

* PR fixes

* Throw when errors from contentstack api


Approved-by: Joakim Jäderberg
2026-01-27 12:38:36 +00:00

19 lines
610 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"
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(),
})