feat(SW-66, SW-348): search functionality and ui
This commit is contained in:
25
server/routers/contentstack/schemas/blocks/textContent.ts
Normal file
25
server/routers/contentstack/schemas/blocks/textContent.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { imageSchema } from "./image"
|
||||
|
||||
import { BlocksEnums } from "@/types/enums/blocks"
|
||||
|
||||
export const textContentSchema = z.object({
|
||||
typename: z
|
||||
.literal(BlocksEnums.block.TextContent)
|
||||
.optional()
|
||||
.default(BlocksEnums.block.TextContent),
|
||||
text_content: z.object({
|
||||
content: z.object({
|
||||
json: z.any(),
|
||||
embedded_itemsConnection: z.object({
|
||||
edges: z.array(
|
||||
z.object({
|
||||
node: z.discriminatedUnion("__typename", [imageSchema]),
|
||||
})
|
||||
),
|
||||
totalCount: z.number(),
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
})
|
||||
Reference in New Issue
Block a user