refactor(types): Standardize CMS data types with snake_case and add metadata fields
- Convert all CmsData interface properties from PascalCase to snake_case for consistency - Add optional metadata fields to CmsData: language, company_name, country, and type - Update CmsHero interface properties: Title→title, Description→description, ButtonText→button_text, ButtonLink→button_link, GifFile→gif_file - Update CmsChart interface: missedAmount→missed_amount - Update CmsSectionWithCards interface: Title→title, Description→description, Cards→cards - Update CmsCard interface: Icon→icon, Title→title, Description→description, add optional id field - Update CmsContact interface: Title→title, Description→description, SubmitButtonText→submit_button_text, Fields→fields - Update CmsContactField interface: Name→name, Label→label, Placeholder→placeholder, Required→required, add optional id field - Update CmsFooter interface: Email→email, Phone→phone, Location→location, Tagline→tagline, Copyright→copyright - Improves API consistency and aligns with backend naming conventions
This commit is contained in:
+31
-25
@@ -7,6 +7,10 @@ export interface CmsResponse {
|
|||||||
export interface CmsData {
|
export interface CmsData {
|
||||||
id: string;
|
id: string;
|
||||||
key: string;
|
key: string;
|
||||||
|
language?: string;
|
||||||
|
company_name?: string;
|
||||||
|
country?: string;
|
||||||
|
type?: string;
|
||||||
hero: CmsHero;
|
hero: CmsHero;
|
||||||
chart: CmsChart;
|
chart: CmsChart;
|
||||||
features: CmsSectionWithCards;
|
features: CmsSectionWithCards;
|
||||||
@@ -19,16 +23,16 @@ export interface CmsData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface CmsHero {
|
export interface CmsHero {
|
||||||
Title: string;
|
title: string;
|
||||||
Description: string;
|
description: string;
|
||||||
ButtonText: string;
|
button_text: string;
|
||||||
ButtonLink: string;
|
button_link: string;
|
||||||
GifFile: string;
|
gif_file: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CmsChart {
|
export interface CmsChart {
|
||||||
title: string;
|
title: string;
|
||||||
missedAmount: string;
|
missed_amount: string;
|
||||||
data: CmsChartDataItem[];
|
data: CmsChartDataItem[];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,35 +42,37 @@ export interface CmsChartDataItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface CmsSectionWithCards {
|
export interface CmsSectionWithCards {
|
||||||
Title: string;
|
title: string;
|
||||||
Description: string;
|
description: string;
|
||||||
Cards: CmsCard[];
|
cards: CmsCard[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CmsCard {
|
export interface CmsCard {
|
||||||
Icon: string;
|
id?: string;
|
||||||
Title: string;
|
icon: string;
|
||||||
Description: string;
|
title: string;
|
||||||
|
description: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CmsContact {
|
export interface CmsContact {
|
||||||
Title: string;
|
title: string;
|
||||||
Description: string;
|
description: string;
|
||||||
SubmitButtonText: string;
|
submit_button_text: string;
|
||||||
Fields: CmsContactField[];
|
fields: CmsContactField[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CmsContactField {
|
export interface CmsContactField {
|
||||||
Name: string;
|
id?: string;
|
||||||
Label: string;
|
name: string;
|
||||||
Placeholder: string;
|
label: string;
|
||||||
Required: boolean;
|
placeholder: string;
|
||||||
|
required: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CmsFooter {
|
export interface CmsFooter {
|
||||||
Email: string;
|
email: string;
|
||||||
Phone: string;
|
phone: string;
|
||||||
Location: string;
|
location: string;
|
||||||
Tagline: string;
|
tagline: string;
|
||||||
Copyright: string;
|
copyright: string;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user