fix: refactor tracking requests

This commit is contained in:
Christel Westerberg
2024-07-15 13:35:00 +02:00
parent c7446032fe
commit 183e1cd6d2
14 changed files with 74 additions and 163 deletions

View File

@@ -125,6 +125,12 @@ export const validateAccountPageSchema = z.object({
url: z.string(),
title: z.string(),
content: z.array(accountPageContentItem),
system: z.object({
uid: z.string(),
locale: z.nativeEnum(Lang),
created_at: z.string(),
updated_at: z.string(),
}),
}),
})
@@ -189,18 +195,3 @@ export const validateAccountPageRefsSchema = z.object({
export type AccountPageRefsDataRaw = z.infer<
typeof validateAccountPageRefsSchema
>
//Tracking
const validateAccountTrackingData = z.object({
account_page: z.object({
system: z.object({
uid: z.string(),
locale: z.string(),
updated_at: z.string(),
created_at: z.string(),
}),
title: z.string().nullable(),
}),
})
export type AccountPageTackingData = z.infer<typeof validateAccountTrackingData>