feat(sw-187): updated typings to use schema
This commit is contained in:
@@ -331,6 +331,20 @@ export const validateLinkItem = z
|
||||
}
|
||||
})
|
||||
|
||||
export const validateSecondaryLinks = z.array(
|
||||
z.object({
|
||||
title: z.string(),
|
||||
links: z.array(validateLinkItem),
|
||||
})
|
||||
)
|
||||
|
||||
export const validateLinksWithType = z.array(
|
||||
z.object({
|
||||
type: z.string(),
|
||||
href: validateExternalLink,
|
||||
})
|
||||
)
|
||||
|
||||
export const validateFooterConfigSchema = z
|
||||
.object({
|
||||
all_footer: z.object({
|
||||
@@ -339,26 +353,11 @@ export const validateFooterConfigSchema = z
|
||||
main_links: z.array(validateLinkItem),
|
||||
app_downloads: z.object({
|
||||
title: z.string(),
|
||||
links: z.array(
|
||||
z.object({
|
||||
type: z.string(),
|
||||
href: validateExternalLink,
|
||||
})
|
||||
),
|
||||
links: validateLinksWithType,
|
||||
}),
|
||||
secondary_links: z.array(
|
||||
z.object({
|
||||
title: z.string(),
|
||||
links: z.array(validateLinkItem),
|
||||
})
|
||||
),
|
||||
secondary_links: validateSecondaryLinks,
|
||||
social_media: z.object({
|
||||
links: z.array(
|
||||
z.object({
|
||||
type: z.string(),
|
||||
href: validateExternalLink,
|
||||
})
|
||||
),
|
||||
links: validateLinksWithType,
|
||||
}),
|
||||
tertiary_links: z.array(validateLinkItem),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user