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 {
|
||||
id: string;
|
||||
key: string;
|
||||
language?: string;
|
||||
company_name?: string;
|
||||
country?: string;
|
||||
type?: string;
|
||||
hero: CmsHero;
|
||||
chart: CmsChart;
|
||||
features: CmsSectionWithCards;
|
||||
@@ -19,16 +23,16 @@ export interface CmsData {
|
||||
}
|
||||
|
||||
export interface CmsHero {
|
||||
Title: string;
|
||||
Description: string;
|
||||
ButtonText: string;
|
||||
ButtonLink: string;
|
||||
GifFile: string;
|
||||
title: string;
|
||||
description: string;
|
||||
button_text: string;
|
||||
button_link: string;
|
||||
gif_file: string;
|
||||
}
|
||||
|
||||
export interface CmsChart {
|
||||
title: string;
|
||||
missedAmount: string;
|
||||
missed_amount: string;
|
||||
data: CmsChartDataItem[];
|
||||
}
|
||||
|
||||
@@ -38,35 +42,37 @@ export interface CmsChartDataItem {
|
||||
}
|
||||
|
||||
export interface CmsSectionWithCards {
|
||||
Title: string;
|
||||
Description: string;
|
||||
Cards: CmsCard[];
|
||||
title: string;
|
||||
description: string;
|
||||
cards: CmsCard[];
|
||||
}
|
||||
|
||||
export interface CmsCard {
|
||||
Icon: string;
|
||||
Title: string;
|
||||
Description: string;
|
||||
id?: string;
|
||||
icon: string;
|
||||
title: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface CmsContact {
|
||||
Title: string;
|
||||
Description: string;
|
||||
SubmitButtonText: string;
|
||||
Fields: CmsContactField[];
|
||||
title: string;
|
||||
description: string;
|
||||
submit_button_text: string;
|
||||
fields: CmsContactField[];
|
||||
}
|
||||
|
||||
export interface CmsContactField {
|
||||
Name: string;
|
||||
Label: string;
|
||||
Placeholder: string;
|
||||
Required: boolean;
|
||||
id?: string;
|
||||
name: string;
|
||||
label: string;
|
||||
placeholder: string;
|
||||
required: boolean;
|
||||
}
|
||||
|
||||
export interface CmsFooter {
|
||||
Email: string;
|
||||
Phone: string;
|
||||
Location: string;
|
||||
Tagline: string;
|
||||
Copyright: string;
|
||||
email: string;
|
||||
phone: string;
|
||||
location: string;
|
||||
tagline: string;
|
||||
copyright: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user