diff --git a/server/routers/contentstack/contentPage/output.ts b/server/routers/contentstack/contentPage/output.ts index f5437052e..2a1bc1681 100644 --- a/server/routers/contentstack/contentPage/output.ts +++ b/server/routers/contentstack/contentPage/output.ts @@ -165,6 +165,12 @@ export const contentPageSchema = z.object({ }), }) +export const contentPageSchemaBlocks = z.object({ + content_page: z.object({ + blocks: discriminatedUnionArray(blocksSchema.options).nullable(), + }), +}) + /** REFS */ const contentPageCardsRefs = z .object({ diff --git a/server/routers/contentstack/contentPage/query.ts b/server/routers/contentstack/contentPage/query.ts index 553b5b586..18f6e4895 100644 --- a/server/routers/contentstack/contentPage/query.ts +++ b/server/routers/contentstack/contentPage/query.ts @@ -18,7 +18,10 @@ import { TrackingChannelEnum, type TrackingSDKPageData, } from "@/types/components/tracking" -import type { GetContentPageSchema } from "@/types/trpc/routers/contentstack/contentPage" +import type { + GetContentPageSchema, + GetContentPageSchemaBlocks, +} from "@/types/trpc/routers/contentstack/contentPage" export const contentPageQueryRouter = router({ get: contentstackExtendedProcedureUID.query(async ({ ctx }) => { diff --git a/types/trpc/routers/contentstack/contentPage.ts b/types/trpc/routers/contentstack/contentPage.ts index 6bc343278..9e1760be6 100644 --- a/types/trpc/routers/contentstack/contentPage.ts +++ b/types/trpc/routers/contentstack/contentPage.ts @@ -4,6 +4,7 @@ import { blocksSchema, contentPageRefsSchema, contentPageSchema, + contentPageSchemaBlocks, sidebarSchema, } from "@/server/routers/contentstack/contentPage/output" @@ -16,6 +17,9 @@ export interface ContentPageRefs export interface GetContentPageSchema extends z.input {} +export interface GetContentPageSchemaBlocks + extends z.input {} + export interface ContentPage extends z.output {} export type Block = z.output