import apiService from './api.service' export interface HomeSlideServiceDto { icon: string titleKey: string descriptionKey: string } export interface HomeSlideDto { titleKey: string subtitleKey: string services: HomeSlideServiceDto[] } export interface HomeFeatureDto { icon: string titleKey: string descriptionKey: string } export interface HomeSolutionDto { icon: string colorClass: string titleKey: string descriptionKey: string } export interface HomeDto { id: string heroBackgroundImageKey: string heroPrimaryCtaKey: string heroSecondaryCtaKey: string featuresTitleKey: string featuresSubtitleKey: string solutionsTitleKey: string solutionsSubtitleKey: string ctaTitleKey: string ctaSubtitleKey: string ctaButtonLabelKey: string slidesDto: HomeSlideDto[] featuresDto: HomeFeatureDto[] solutionsDto: HomeSolutionDto[] } export interface SaveHomeSlideServiceInput { icon: string titleKey: string titleValue: string descriptionKey: string descriptionValue: string } export interface SaveHomeSlideInput { titleKey: string titleValue: string subtitleKey: string subtitleValue: string services: SaveHomeSlideServiceInput[] } export interface SaveHomeFeatureInput { icon: string titleKey: string titleValue: string descriptionKey: string descriptionValue: string } export interface SaveHomeSolutionInput { icon: string colorClass: string titleKey: string titleValue: string descriptionKey: string descriptionValue: string } export interface SaveHomePageInput { cultureName: string heroBackgroundImageKey: string heroBackgroundImageValue: string heroPrimaryCtaKey: string heroPrimaryCtaValue: string heroSecondaryCtaKey: string heroSecondaryCtaValue: string featuresTitleKey: string featuresTitleValue: string featuresSubtitleKey: string featuresSubtitleValue: string solutionsTitleKey: string solutionsTitleValue: string solutionsSubtitleKey: string solutionsSubtitleValue: string ctaTitleKey: string ctaTitleValue: string ctaSubtitleKey: string ctaSubtitleValue: string ctaButtonLabelKey: string ctaButtonLabelValue: string slides: SaveHomeSlideInput[] features: SaveHomeFeatureInput[] solutions: SaveHomeSolutionInput[] } export function getHome() { return apiService.fetchData( { method: 'GET', url: '/api/app/public/home', }, { apiName: 'Default' }, ) } export function saveHomePage(input: SaveHomePageInput) { return apiService.fetchData( { method: 'POST', url: '/api/app/public/save-home-page', data: input, }, { apiName: 'Default' }, ) }