feat(SW-214): Setup connection to Contentstack
This commit is contained in:
@@ -18,6 +18,8 @@ import {
|
||||
shortcutsRefsSchema,
|
||||
shortcutsSchema,
|
||||
} from "../schemas/blocks/shortcuts"
|
||||
import { textColsRefsSchema, textColsSchema } from "../schemas/blocks/textCols"
|
||||
import { uspGridSchema } from "../schemas/blocks/uspGrid"
|
||||
import { tempImageVaultAssetSchema } from "../schemas/imageVault"
|
||||
import {
|
||||
contentRefsSchema as sidebarContentRefsSchema,
|
||||
@@ -31,7 +33,6 @@ import {
|
||||
import { systemSchema } from "../schemas/system"
|
||||
|
||||
import { ContentPageEnum } from "@/types/enums/contentPage"
|
||||
import { textColsRefsSchema, textColsSchema } from "../schemas/blocks/textCols"
|
||||
|
||||
// Block schemas
|
||||
export const contentPageCards = z
|
||||
@@ -58,9 +59,17 @@ export const contentPageShortcuts = z
|
||||
})
|
||||
.merge(shortcutsSchema)
|
||||
|
||||
export const contentPageTextCols = z.object({
|
||||
__typename: z.literal(ContentPageEnum.ContentStack.blocks.TextCols),
|
||||
}).merge(textColsSchema)
|
||||
export const contentPageTextCols = z
|
||||
.object({
|
||||
__typename: z.literal(ContentPageEnum.ContentStack.blocks.TextCols),
|
||||
})
|
||||
.merge(textColsSchema)
|
||||
|
||||
export const contentPageUspGrid = z
|
||||
.object({
|
||||
__typename: z.literal(ContentPageEnum.ContentStack.blocks.UspGrid),
|
||||
})
|
||||
.merge(uspGridSchema)
|
||||
|
||||
export const blocksSchema = z.discriminatedUnion("__typename", [
|
||||
contentPageCards,
|
||||
@@ -68,6 +77,7 @@ export const blocksSchema = z.discriminatedUnion("__typename", [
|
||||
contentPageDynamicContent,
|
||||
contentPageShortcuts,
|
||||
contentPageTextCols,
|
||||
contentPageUspGrid,
|
||||
])
|
||||
|
||||
export const contentPageSidebarContent = z
|
||||
|
||||
Reference in New Issue
Block a user