feat(SW-1384): add CarouselCards block to start page * feat(SW-1384): add filterable carousel cards block to start page * fix(SW-1384): remove unnecessary link prop from SectionHeader * fix(SW-1384): remove uneeded undefined * fix(SW-1384): better type safety * feat(SW-1384): Add see all link to filterable carousel cards section header * refactor(SW-1384): Replace FilterableCarouselCards with CarouselCards block * fix(SW-1384): Remove CardsEnumType type definition * fix(SW-1384):Implement code review feedback to CarouselCards * refactor(SW-1384): Convert CarouselCardFilterEnum to const enum with type Approved-by: Christian Andolf
26 lines
792 B
TypeScript
26 lines
792 B
TypeScript
import { z } from "zod"
|
|
|
|
import { tempImageVaultAssetSchema } from "../../imageVault"
|
|
import { systemSchema } from "../../system"
|
|
import { buttonSchema } from "../utils/buttonLinkSchema"
|
|
import { linkConnectionRefsSchema } from "../utils/linkConnection"
|
|
|
|
import { CardsEnum } from "@/types/enums/cards"
|
|
|
|
export const loyaltyCardBlockSchema = z.object({
|
|
__typename: z.literal(CardsEnum.LoyaltyCard),
|
|
body_text: z.string().optional(),
|
|
heading: z.string().optional().default(""),
|
|
// JSON - ImageVault Image
|
|
image: tempImageVaultAssetSchema,
|
|
link: buttonSchema,
|
|
system: systemSchema,
|
|
title: z.string().optional(),
|
|
})
|
|
|
|
export const loyaltyCardBlockRefsSchema = z.object({
|
|
__typename: z.literal(CardsEnum.LoyaltyCard),
|
|
link: linkConnectionRefsSchema,
|
|
system: systemSchema,
|
|
})
|