Feat/BOOK-240 hero video

Approved-by: Chuma Mcphoy (We Ahead)
Approved-by: Christel Westerberg
This commit is contained in:
Erik Tiekstra
2025-12-11 08:35:27 +00:00
parent cd8b30f2ec
commit f06e466827
33 changed files with 727 additions and 122 deletions

View File

@@ -23,6 +23,7 @@ import {
} from "../schemas/linkConnection"
import { internalOrExternalLinkSchema } from "../schemas/pageLinks"
import { systemSchema } from "../schemas/system"
import { transformedVideoSchema, videoRefSchema } from "../schemas/video"
// Block schemas
export const collectionPageCards = z
@@ -78,6 +79,7 @@ const navigationLinksSchema = z
export const collectionPageSchema = z.object({
collection_page: z.object({
hero_image: transformedImageVaultAssetSchema,
hero_video: transformedVideoSchema,
blocks: discriminatedUnionArray(blocksSchema.options).nullable(),
title: z.string(),
header: z.object({
@@ -145,6 +147,7 @@ const collectionPageHeaderRefs = z.object({
export const collectionPageRefsSchema = z.object({
collection_page: z.object({
hero_video: videoRefSchema.nullish(),
header: collectionPageHeaderRefs,
blocks: discriminatedUnionArray(
collectionPageBlockRefsItem.options

View File

@@ -11,6 +11,7 @@ import {
import {
generateRefsResponseTag,
generateTag,
generateTagsFromAssetSystem,
generateTagsFromSystem,
} from "../../../utils/generateTag"
import { collectionPageRefsSchema } from "./output"
@@ -84,6 +85,7 @@ export function generatePageTags(
const connections = getConnections(validatedData)
return [
generateTagsFromSystem(lang, connections),
generateTagsFromAssetSystem(connections),
generateTag(lang, validatedData.collection_page.system.uid),
].flat()
}