@anoki/fse-common
Version:
Common types for FSE
252 lines (216 loc) • 8.76 kB
text/typescript
export type GetValues<T> = T[keyof T]
export const RenderTypeEnum = {
STATIC: 'Static',
DYNAMIC: 'Dynamic',
} as const
export type RenderTypes = GetValues<typeof RenderTypeEnum>
export const ReferenceEntityTypeEnum = {
NEWS: 'News',
SERVICE: 'Service',
PAGE: 'Page',
AGGREGATION_PAGE: 'AggregationPage',
AGGREGATION_ITEM: 'AggregationItem',
EVENT: 'Event',
STRUCTURE: 'Structure',
DOCUMENT: 'Document',
CATEGORY: 'Category',
ENTITY_TYPE: 'EntityType',
FAQ: 'Faq',
} as const
export type ReferenceEntityTypes = GetValues<typeof ReferenceEntityTypeEnum>
export const PublicationTypeEnum = {
ANNOUNCEMENT: 'Announcement',
ALERT: 'Alert',
} as const
export type PublicationTypes = GetValues<typeof PublicationTypeEnum>
export const ProcedureTypeEnum = {
OPEN_PROCEDURE: 'OpenProcedure',
} as const
export type ProcedureTypes = GetValues<typeof ProcedureTypeEnum>
export const AggregationPageTypeEnum = {
USER_TYPE: 'UserType',
THEMATIC: 'Thematic',
} as const
export type AggregationPageTypes = GetValues<typeof AggregationPageTypeEnum>
export const PageTypeEnum = {
HOME: 'Home',
STATIC_CONTENT: 'StaticContent',
SERVICES: 'Services',
EVENTS: 'Events',
COMMUNICATION: 'Communication',
FSE_COMMUNICATION: 'FseCommunication', // Used for FSE Communication main page
} as const
export type PageTypes = GetValues<typeof PageTypeEnum>
/**
* These are the section types used to create section on CMS Pages
* Work in progress, added day by day
*
* Each section that have items, used AggregationItem
*/
export const SectionTypeEnum = {
SERVICES: 'SectionServices',
SUGGESTED_SERVICES: 'SuggestedServices',
LOGIN: 'Login', // The login section used to display the authentication methods
WHAT_DO_YOU_NEED: 'WhatDoYouNeed', // Used to display the section "Di cosa hai bisogno"
HOME_SERVICES: 'HomeServices', // Used for home page section "Scopri cosa puoi fare"
SERVICES_BY_ENTITY_TYPE: 'ServicesByEntityType', // Used to display services for specif entityType
NEED_HELP: 'NeedHelp', // Used to display Need Help section
RICH_TEXT: 'RichText',
FOLDER: 'Folder', // Used for amministrazione-trasparente
FILES: 'Files', // Used for amministrazione-trasparente
ENTITY_TYPE_ID: 'EntityTypeId', // Used to display entity type id,
STEPPER_ACCORDION: 'StepperAccordion', // Used to display accordion with stepper
EDITORIAL_WIDGET_ALERT: 'EditorialWidgetAlert', // Used to display editorial widget alert
DOCUMENTS: 'Documents', // Used to display documents
EDITORIAL_WIDGET_ACTION_BANNER: 'EditorialWidgetActionBanner', // U
TAGS: 'Tags', // Used to display tags
EDITORIAL_WIDGET: 'EditorialWidget', // Used to display editorial widget (Light/Evidence),
EDITORIAL_WIDGET_BLOCK_QUOTE: 'EditorialWidgetBlockQuote', // Used to display editorial widget (Block Quote),
EDITORIAL_WIDGET_CALLOUT: 'EditorialWidgetCallout', // Used to display editorial widget (Callout),
GENERIC_CAROUSEL: 'GenericCarousel', // Used to display generic carousel
INSIGHTS: 'InsightsSection', // Used to display insights
VIDEO: 'Video', // Used to display video
IMAGES: 'Images', // Used to display images
VERTICAL_STEPPER_ACCORDION: 'VerticalStepperAccordion', // Used to display vertical stepper accordion
TABLE_LIST: 'TableList', // Used to display table list
TABLE_CARD: 'TableCard', // Used to display table card
CARD_FAQ_CTA_SECTION: 'CardFaqCtaSection',
CARD_PREVIEW_SECTION: 'CardPreviewSection',
CARD_FEATURED_SECTION: 'CardFeaturedSection',
ACCORDION_SECTION: 'AccordionSection',
FEEDBACK_SECTION: 'FeedbackSection',
TASK_FORCE_FORM_SECTION: 'TaskForceFormSection',
SLIDER_SECTION: 'SliderSection', // Used to display slider section in home page and communication page
COMMUNICATION_TAGS_SECTION: 'CommunicationTagsSection', // Tags section included in communication page
COMMUNICATION_SEARCH_SECTION: 'CommunicationSearchSection', // Search section included in communication page
COMMUNICATION_CONTENTS_SECTION: 'CommunicationContentsSection', // Content section included in communication page
COMMUNICATION_CONTENTS_HOME_SECTION: 'CommunicationContentsHomeSection', // Content section included in home page
LATEST_CLINICAL_DATA_SECTION: 'LatestClinicalDataSection',
} as const
export type SectionTypes = GetValues<typeof SectionTypeEnum>
export const AnnouncementTypeEnum = {
TENDER: 'Tender',
CONTEST: 'Contest',
PRAETORIAN_REGISTER: 'PraetorianRegister',
} as const
export type AnnouncementTypes = GetValues<typeof AnnouncementTypeEnum>
export const ContestTypeEnum = {
EXTERNAL: 'External',
INTERNAL: 'Internal',
} as const
export type contestsTypes = GetValues<typeof ContestTypeEnum>
export const OrganizationStructureEnum = {
GENERAL_DIRECTION: 'GeneralDirection',
UO: 'UO',
PERSONNEL: 'Personnel',
} as const
export type OrganizationStructure = GetValues<typeof OrganizationStructureEnum>
export const RegisterTypeEnum = {
DIRECTOR_DETERMINED: 'DirectorDetermined',
MANAGER_DETERMINED: 'ManagerDetermined',
} as const
export type RegisterTypes = GetValues<typeof RegisterTypeEnum>
export const ElementTypeEnum = {
AVATAR: 'Avatar',
CARD_BASIC: 'CardBasic',
CARD_EVENT: 'CardEvent',
CARD_FEATURED: 'CardFeatured',
CARD_LIFE: 'CardLife',
CARD_FILE: 'CardFile',
CARD_GHOST: 'CardGhost',
CARD_GUIDE: 'CardGuide',
CARD_LIST: 'CardList',
CARD_NEWS: 'CardNews',
CARD_PEOPLE: 'CardPeople',
CARD_PLACE: 'CardPlace',
CARD_SERVICE: 'CardService',
CARD_USER: 'CardUser',
CARD_DOCUMENT: 'CardDocument',
CARD: 'Card',
CHIP_LINK: 'ChipLink',
ICONS: 'Icons',
INDEX: 'Index',
LINK: 'Link',
PLACEHOLDER: 'Placeholder',
TEXT: 'Text',
RICH_TEXT: 'RichText',
STEPPER_ITEM: 'StepperItem',
EDITORIAL_WIDGET_ALERT: 'EditorialWidgetAlert',
EDITORIAL_WIDGET_ACTION_BANNER: 'EditorialWidgetActionBanner',
EDITORIAL_WIDGET: 'EditorialWidget',
EDITORIAL_WIDGET_BLOCK_QUOTE: 'EditorialWidgetBlockQuote',
EDITORIAL_WIDGET_CALLOUT: 'EditorialWidgetCallout',
GENERIC_CAROUSEL_ITEM: 'GenericCarouselItem',
INSIGHT_ITEM: 'InsightItem',
VIDEO: 'Video',
IMAGE: 'Image',
VERTICAL_STEPPER_ITEM: 'VerticalStepperItem',
TABLE_LIST_ITEM: 'TableListItem',
TABLE_CARD_ITEM: 'TableCardItem',
CARD_FAQ_CTA_ITEM: 'CardFaqCtaItem',
CARD_PREVIEW_ITEM: 'CardPreviewItem',
CARD_FEATURED_ITEM: 'CardFeaturedItem',
ACCORDION_ITEM: 'AccordionItem',
FEEDBACK_ITEM: 'FeedbackItem',
TASK_FORCE_FORM_ITEM: 'TaskForceFormItem',
SLIDER_ITEM: 'SliderItem', // Used to display slider section in home page and communication page
COMMUNICATION_TAGS_ITEM: 'CommunicationTagsItem', // Tags section included in communication page
COMMUNICATION_SEARCH_ITEM: 'CommunicationSearchItem', // Search section included in communication page
COMMUNICATION_CONTENTS_ITEM: 'CommunicationContentsItem', // Content section included in communication page
COMMUNICATION_CONTENTS_HOME_SECTION: 'CommunicationContentsHomeSection', // Content section included in home page
LATEST_CLINICAL_DATA_SECTION: 'LatestClinicalDataSection',
} as const
export type ElementTypes = GetValues<typeof ElementTypeEnum>
export const EntityTypeTypesEnum = {
PARENT: 'Parent',
CHILD: 'Child',
} as const
export type EntityTypeTypes = GetValues<typeof EntityTypeTypesEnum>
export const CategoriesUrlEnum = {
SERVIZI_E_PRESTAZIONI: 'servizi',
ASL_COMUNICA: 'ast-comunica',
AST_COMUNICA: 'ast-comunica',
STRUTTURE: 'strutture',
ORGANIZZAZIONE: 'organizzazione',
COME_FARE_PER: 'come-fare-per',
FAQ: 'supporto',
} as const
export type CategoryUrls = GetValues<typeof CategoriesUrlEnum>
export const LanguagesEnum = {
it: 'it',
en: 'en',
} as const
export const LanguagesValues = Object.values(LanguagesEnum)
export type Languages = GetValues<typeof LanguagesEnum>
export const EntitiesEnum = {
AGGREGATION_ITEMS: 'aggregation-items',
AGGREGATION_PAGES: 'aggregation-pages',
SERVICES: 'services',
STRUCTURES: 'structures',
PAGES: 'pages',
SECTIONS: 'sections',
ELEMENTS: 'elements',
NEWS: 'news',
EVENTS: 'events',
SETTINGS: 'settings',
DOCUMENTS: 'documents',
FAQS: 'faqs',
DOCUMENT_FOLDERS: 'document-folders',
} as const
export const FaqTypesEnum = {
GENERIC_FAQS: 'FAQS Generiche',
PAGE_FAQS: 'FAQS Pagina',
} as const
export type FaqTypes = GetValues<typeof FaqTypesEnum>
/**
* Bind service as its own page url
* This is the enum of services available on logged user.
* Each of these service has itw own custom implementation page
*/
export const ServicePageUrlsEnum = {
DOCTOR: 'medico-di-famiglia',
FIND_STRUCTURES: 'cerca-una-struttura',
ARCHIVE: 'tutti-i-documenti',
HEALTH_PROFILE: 'profilo-della-salute',
PAYMENTS: 'pagamenti',
} as const