refactor(marketing): Standardize step components and data structure
- Rename field names across step components for consistency - Update chart step to use more generic data structure - Modify input field names to follow consistent naming convention - Refactor chart step to use key-value pairs instead of x-y coordinates - Update form field names in multiple marketing wizard steps - Improve type consistency and naming across marketing wizard components
This commit is contained in:
@@ -1,5 +1,75 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const CmsCredentials = z.object({ advantages: z.object({
|
||||
cards: z.array(
|
||||
z.object({
|
||||
description: z.string(),
|
||||
icon: z.string(),
|
||||
title: z.string(),
|
||||
}),
|
||||
),
|
||||
description: z.string(),
|
||||
title: z.string(),
|
||||
}),
|
||||
challenges: z.object({
|
||||
cards: z.array(
|
||||
z.object({
|
||||
description: z.string(),
|
||||
icon: z.string(),
|
||||
title: z.string(),
|
||||
}),
|
||||
),
|
||||
description: z.string(),
|
||||
title: z.string(),
|
||||
}),
|
||||
chart: z.object({
|
||||
data: z.array(
|
||||
z.object({
|
||||
key: z.string(),
|
||||
value: z.number(),
|
||||
}),
|
||||
),
|
||||
missedAmount: z.string(),
|
||||
title: z.string(),
|
||||
}),
|
||||
contact: z.object({
|
||||
description: z.string(),
|
||||
fields: z.array(
|
||||
z.object({
|
||||
label: z.string(),
|
||||
name: z.string(),
|
||||
placeholder: z.string(),
|
||||
required: z.boolean(),
|
||||
}),
|
||||
),
|
||||
submitButtonText: z.string(),
|
||||
title: z.string(),
|
||||
}),
|
||||
features: z.object({
|
||||
cards: z.array(
|
||||
z.object({
|
||||
description: z.string(),
|
||||
icon: z.string(),
|
||||
title: z.string(),
|
||||
}),
|
||||
),
|
||||
description: z.string(),
|
||||
title: z.string(),
|
||||
}),
|
||||
footer: z.object({
|
||||
copyright: z.string(),
|
||||
email: z.string(),
|
||||
location: z.string(),
|
||||
phone: z.string(),
|
||||
tagline: z.string(),
|
||||
}),
|
||||
hero: z.object({
|
||||
buttonLink: z.string(),
|
||||
buttonText: z.string(),
|
||||
description: z.string(),
|
||||
gifFile: z.string(),
|
||||
title: z.string(),
|
||||
})})
|
||||
const CmsSchema = z.object({
|
||||
cms: z.array(
|
||||
z.object({
|
||||
@@ -82,3 +152,4 @@ const CmsSchema = z.object({
|
||||
),
|
||||
});
|
||||
export type TCmsResponse = z.infer<typeof CmsSchema>;
|
||||
export type TCmsCredentials = z.infer<typeof CmsCredentials>
|
||||
Reference in New Issue
Block a user