feat: improve structure and error handling
This commit is contained in:
19
types/requests/entry.ts
Normal file
19
types/requests/entry.ts
Normal file
@@ -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,
|
||||
})
|
||||
Reference in New Issue
Block a user