73 lines
1.7 KiB
TypeScript
73 lines
1.7 KiB
TypeScript
import apiService from './api.service'
|
|
import { ContactDto } from '@/proxy/contact/models'
|
|
|
|
export interface SaveLocalizedTextInput {
|
|
key: string
|
|
value: string
|
|
}
|
|
|
|
export function getContact() {
|
|
return apiService.fetchData<ContactDto>(
|
|
{
|
|
method: 'GET',
|
|
url: '/api/app/public/contact',
|
|
},
|
|
{ apiName: 'Default' },
|
|
)
|
|
}
|
|
|
|
export interface SaveContactPageInput extends Record<string, unknown> {
|
|
cultureName: string
|
|
heroTitleKey: string
|
|
heroTitleValue: string
|
|
heroSubtitleKey: string
|
|
heroSubtitleValue: string
|
|
heroImageKey: string
|
|
heroImageValue: string
|
|
contactInfoTitleKey: string
|
|
contactInfoTitleValue: string
|
|
addressKey: string
|
|
addressValue: string
|
|
phoneNumber: string
|
|
email: string
|
|
location: string
|
|
taxNumber: string
|
|
bankTitleKey: string
|
|
bankTitleValue: string
|
|
bankAccountHolder: string
|
|
bankBranch: string
|
|
bankAccountNumber: string
|
|
bankIban: string
|
|
bankStyleClass: string
|
|
workHoursTitleKey: string
|
|
workHoursTitleValue: string
|
|
workWeekdayKey: string
|
|
workWeekdayValue: string
|
|
workWeekendKey: string
|
|
workWeekendValue: string
|
|
workWhatsappKey: string
|
|
workWhatsappValue: string
|
|
workHoursStyleClass: string
|
|
mapTitleKey: string
|
|
mapTitleValue: string
|
|
mapSrc: string
|
|
mapWidth: string
|
|
mapHeight: string
|
|
mapAllowFullScreen: boolean
|
|
mapLoading: string
|
|
mapReferrerPolicy: string
|
|
mapContainerStyleClass: string
|
|
mapFrameStyleClass: string
|
|
styleTexts: SaveLocalizedTextInput[]
|
|
}
|
|
|
|
export function saveContactPage(input: SaveContactPageInput) {
|
|
return apiService.fetchData<void>(
|
|
{
|
|
method: 'POST',
|
|
url: '/api/app/public/save-contact-page',
|
|
data: input,
|
|
},
|
|
{ apiName: 'Default' },
|
|
)
|
|
}
|