UNPKG

@anoki/fse-common

Version:

Common types for FSE

91 lines (80 loc) 2.34 kB
import { Upload } from './upload-file' import { WithMongooseProps } from './with-mongoose-props' import { WithTranslations } from './with-translations' import { GetValues } from '../constants' export type SettingHeaderLink = { label: string path?: string visible: boolean externalLink: boolean // indicate if the link is an external link or not pageId?: string // indicate if the header is related to a page (Service) toTheRight?: boolean // indicate if the link is to the right or not } export type SettingFooterLink = { label: string path?: string visible: boolean href?: string externalLink: boolean } export type SettingTranslatedField = { headerTitle: string headerShortTitle: string headerLinks: SettingHeaderLink[] // the public home page headers link footerLinks: SettingFooterLink[] backofficeTitle: string backofficeDescription: string bannerNewPortalTitle?: string bannerNewPortalSubtitle?: string bannerNewPortalLinkTitle?: string } export type SettingProfileMenu = { healthProfileVisible: boolean healthHistoryVisible: boolean } export const ConsentReminderLayout = { BANNER: 'banner', CARD: 'card', } as const export const HeadingStyleEnum = { BASE: 'base', REVISED: 'revised', } as const export type ConsentTypeReminderLayout = GetValues<typeof ConsentReminderLayout> export type HeadingStyle = GetValues<typeof HeadingStyleEnum> export type SettingHome = { consentReminderLayout: ConsentTypeReminderLayout newPortalBannerVisible?: boolean newPortalBannerLink?: string } export type SettingFooter = { FseMS: string FseMEF: string FseDGT: string FseUE: string FseIT: string externalLink: string externalLinkName: string } export type Setting = WithMongooseProps< SettingTranslatedField & { faviconLogo?: Upload headerLogo?: Upload headerLogo2?: Upload backofficeLogo?: Upload footerLogo?: Upload notificationsEnabled: boolean headingStyle: HeadingStyle profileMenu: SettingProfileMenu translations: WithTranslations<SettingTranslatedField> home: SettingHome footer: SettingFooter supportEnabled: true supportEmail: string supportPhone: string supportUrl?: string bannerNewPortalTitle?: string bannerNewPortalSubtitle?: string bannerNewPortalLinkTitle?: string } >