feat(SW-1818): Refactored sysAsset handling to support PDF links
Approved-by: Matilda Landström
This commit is contained in:
@@ -12,11 +12,11 @@ import {
|
||||
startPageSchema,
|
||||
transformPageLink,
|
||||
} from "../pageLinks"
|
||||
import { imageRefsSchema, imageSchema } from "./image"
|
||||
import {
|
||||
imageContainerRefsSchema,
|
||||
imageContainerSchema,
|
||||
} from "./imageContainer"
|
||||
import { sysAssetRefsSchema, sysAssetSchema } from "./sysAsset"
|
||||
|
||||
import { BlocksEnums } from "@/types/enums/blocks"
|
||||
import { ContentEnum } from "@/types/enums/content"
|
||||
@@ -36,7 +36,7 @@ export const contentSchema = z.object({
|
||||
node: z
|
||||
.discriminatedUnion("__typename", [
|
||||
imageContainerSchema,
|
||||
imageSchema,
|
||||
sysAssetSchema,
|
||||
accountPageSchema,
|
||||
collectionPageSchema,
|
||||
contentPageSchema,
|
||||
@@ -72,7 +72,7 @@ export const contentRefsSchema = z.object({
|
||||
edges: z.array(
|
||||
z.object({
|
||||
node: z.discriminatedUnion("__typename", [
|
||||
imageRefsSchema,
|
||||
sysAssetRefsSchema,
|
||||
imageContainerRefsSchema,
|
||||
accountPageSchema,
|
||||
collectionPageSchema,
|
||||
|
||||
Reference in New Issue
Block a user