51f9caeeed
- 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
79 lines
1.3 KiB
TypeScript
79 lines
1.3 KiB
TypeScript
export interface CmsResponse {
|
|
success: boolean;
|
|
message: string;
|
|
data: CmsData;
|
|
}
|
|
|
|
export interface CmsData {
|
|
id: string;
|
|
key: string;
|
|
language?: string;
|
|
company_name?: string;
|
|
country?: string;
|
|
type?: string;
|
|
hero: CmsHero;
|
|
chart: CmsChart;
|
|
features: CmsSectionWithCards;
|
|
challenges: CmsSectionWithCards;
|
|
advantages: CmsSectionWithCards;
|
|
contact: CmsContact;
|
|
footer: CmsFooter;
|
|
created_at: number;
|
|
updated_at: number;
|
|
}
|
|
|
|
export interface CmsHero {
|
|
title: string;
|
|
description: string;
|
|
button_text: string;
|
|
button_link: string;
|
|
gif_file: string;
|
|
}
|
|
|
|
export interface CmsChart {
|
|
title: string;
|
|
missed_amount: string;
|
|
data: CmsChartDataItem[];
|
|
}
|
|
|
|
export interface CmsChartDataItem {
|
|
key: string;
|
|
value: number;
|
|
}
|
|
|
|
export interface CmsSectionWithCards {
|
|
title: string;
|
|
description: string;
|
|
cards: CmsCard[];
|
|
}
|
|
|
|
export interface CmsCard {
|
|
id?: string;
|
|
icon: string;
|
|
title: string;
|
|
description: string;
|
|
}
|
|
|
|
export interface CmsContact {
|
|
title: string;
|
|
description: string;
|
|
submit_button_text: string;
|
|
fields: CmsContactField[];
|
|
}
|
|
|
|
export interface CmsContactField {
|
|
id?: string;
|
|
name: string;
|
|
label: string;
|
|
placeholder: string;
|
|
required: boolean;
|
|
}
|
|
|
|
export interface CmsFooter {
|
|
email: string;
|
|
phone: string;
|
|
location: string;
|
|
tagline: string;
|
|
copyright: string;
|
|
}
|