feat(SW-1818): Refactored sysAsset handling to support PDF links

Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-06-09 09:28:17 +00:00
parent bff34b034e
commit ac953ccd97
23 changed files with 86 additions and 84 deletions

View File

@@ -1,6 +1,6 @@
import { z } from "zod"
import { imageSchema } from "./image"
import { sysAssetSchema } from "./sysAsset"
import { BlocksEnums } from "@/types/enums/blocks"
@@ -15,7 +15,7 @@ export const textContentSchema = z.object({
embedded_itemsConnection: z.object({
edges: z.array(
z.object({
node: z.discriminatedUnion("__typename", [imageSchema]),
node: z.discriminatedUnion("__typename", [sysAssetSchema]),
})
),
totalCount: z.number(),