@anoki/fse-common
Version:
Common types for FSE
44 lines (41 loc) • 1.11 kB
text/typescript
import { WithMongooseProps } from './with-mongoose-props'
import { WithTranslations } from './with-translations'
import { ReferenceEntityTypes, RenderTypes, SectionTypes } from '../constants'
import { Element } from './element'
import { EntityType } from './entity-type'
import { Category } from './category'
export type Section = WithMongooseProps<{
name: string
description: string
loginTitle?: string
loginDescription?: string
buttonLabel?: string
buttonAriaLabel?: string
renderType: RenderTypes
referenceEntityType: ReferenceEntityTypes
sectionType: SectionTypes
orderPosition: number
referenceId?: string
categoryId?: string
category?: Category
entityTypeId?: string
entityType?: EntityType
pageId: string
elements: Element[]
links?: SectionLink[]
variant?: string
translations: WithTranslations<{
name: string
description: string
loginTitle?: string
loginDescription?: string
buttonLabel?: string
buttonAriaLabel?: string
links?: SectionLink[]
}>
}>
export type SectionLink = {
link: string
title: string
isExternal?: boolean
}