feat: improve structure and error handling
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
import z from "zod"
|
||||
|
||||
export const validateContentTypeUid = z.object({
|
||||
all_content_page: z.object({
|
||||
total: z.number(),
|
||||
}),
|
||||
all_loyalty_page: z.object({
|
||||
total: z.number(),
|
||||
}),
|
||||
all_current_blocks_page: z.object({
|
||||
total: z.number(),
|
||||
}),
|
||||
})
|
||||
@@ -0,0 +1,19 @@
|
||||
import z from "zod"
|
||||
|
||||
const entryResolveSchema = z.object({
|
||||
items: z.array(
|
||||
z.object({
|
||||
system: z.object({
|
||||
content_type_uid: z.string(),
|
||||
uid: z.string(),
|
||||
}),
|
||||
})
|
||||
),
|
||||
total: z.number(),
|
||||
})
|
||||
|
||||
export const validateEntryResolveSchema = z.object({
|
||||
all_content_page: entryResolveSchema,
|
||||
all_loyalty_page: entryResolveSchema,
|
||||
all_current_blocks_page: entryResolveSchema,
|
||||
})
|
||||
@@ -1,10 +0,0 @@
|
||||
import type { Image } from "../../image"
|
||||
import type { EdgesWithTotalCount } from "../utils/edges"
|
||||
|
||||
export type LogoQueryData = {
|
||||
all_header: {
|
||||
items: {
|
||||
logoConnection: EdgesWithTotalCount<Image>
|
||||
}[]
|
||||
}
|
||||
}
|
||||
@@ -15,10 +15,6 @@ export type MenuItem = {
|
||||
subItems?: MenuItem[]
|
||||
}
|
||||
|
||||
export type SidebarProps = {
|
||||
lang: Lang
|
||||
}
|
||||
|
||||
interface NavigationLink {
|
||||
system: {
|
||||
locale: Lang
|
||||
|
||||
Reference in New Issue
Block a user