@anoki/fse-common
Version:
Common types for FSE
42 lines (41 loc) • 1.23 kB
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;
};