fix: validation for header
This commit is contained in:
11
types/trpc/routers/contentstack/footer.ts
Normal file
11
types/trpc/routers/contentstack/footer.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import {
|
||||
validateLinkItem,
|
||||
validateLinksWithType,
|
||||
validateSecondaryLinks,
|
||||
} from "@/server/routers/contentstack/base/output"
|
||||
|
||||
export type FooterLink = z.output<typeof validateLinkItem>
|
||||
export type FooterSecondaryNavGroup = z.output<typeof validateSecondaryLinks>
|
||||
export type FooterLinkWithType = z.output<typeof validateLinksWithType>
|
||||
15
types/trpc/routers/contentstack/header.ts
Normal file
15
types/trpc/routers/contentstack/header.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import {
|
||||
headerRefsSchema,
|
||||
headerSchema,
|
||||
menuItemSchema,
|
||||
} from "@/server/routers/contentstack/base/output"
|
||||
|
||||
export type GetHeaderRefs = z.input<typeof headerRefsSchema>
|
||||
export type HeaderRefs = NonNullable<z.output<typeof headerRefsSchema>>
|
||||
|
||||
export type GetHeader = z.input<typeof headerSchema>
|
||||
export type Header = z.output<typeof headerSchema>
|
||||
|
||||
export type MenuItem = z.output<typeof menuItemSchema>
|
||||
Reference in New Issue
Block a user