export type GetValues = T[keyof T] export const RenderTypeEnum = { STATIC: 'Static', DYNAMIC: 'Dynamic', } as const export type RenderTypes = GetValues export const ReferenceEntityTypeEnum = { NEWS: 'News', SERVICE: 'Service', PAGE: 'Page', AGGREGATION_PAGE: 'AggregationPage', AGGREGATION_ITEM: 'AggregationItem', ASL_PERSON: 'AslPeople', ANNOUNCEMENT: 'Announcement', TENDER: 'Tender', EVENT: 'Event', HOW_TO: 'HowTo', STRUCTURE: 'Structure', UNIT: 'Unit', DOCUMENT: 'Document', CATEGORY: 'Category', ENTITY_TYPE: 'EntityType', ACT: 'Act', } as const export type ReferenceEntityTypes = GetValues export const PublicationTypeEnum = { ANNOUNCEMENT: 'Announcement', ALERT: 'Alert', } as const export type PublicationTypes = GetValues export const ProcedureTypeEnum = { OPEN_PROCEDURE: 'OpenProcedure', } as const export type ProcedureTypes = GetValues export const AggregationPageTypeEnum = { USER_TYPE: 'UserType', THEMATIC: 'Thematic', } as const export type AggregationPageTypes = GetValues export const PageTypeEnum = { HOME: 'Home', LIST: 'List', ANNOUNCEMENT: 'Announcement', NEWS: 'News', SERVICE: 'Service', ASL_ANNOUNCES: 'AslAnnouncements', SERVICES_BENEFITS: 'ServicesBenefits', STRUCTURE: 'Structure', HOW_TO: 'HowTo', ORGANIZATION: 'Organization', STATIC_CONTENT: 'StaticContent', CONTENT: 'Content', WHO_WE_ARE: 'WhoWeAre', TRANSPARENT_ADMINISTRATION: 'TransparentAdministration', } as const export type PageTypes = GetValues export const PageSubtypeEnum = { TRANSPARENT_ADMINISTRATION_PAYMENTS: 'TransparentAdministrationPayments', //pagamenti TRANSPARENT_ADMINISTRATION_CALLS_FOR_TENDERS: 'TransparentAdministrationCallsForTenders', //bandi di gara // TRANSPARENT_ADMINISTRATION_CALLS_FOR_APPLICATIONS: 'TransparentAdministrationCallsForApplications', //bandi di concorso }; export type PageSubtypes = GetValues export const PAGE_SUBTYPE_BY_TYPE = { [PageTypeEnum.HOME]: [], [PageTypeEnum.LIST]: [], [PageTypeEnum.ANNOUNCEMENT]: [], [PageTypeEnum.NEWS]: [], [PageTypeEnum.SERVICE]: [], [PageTypeEnum.ASL_ANNOUNCES]: [], [PageTypeEnum.SERVICES_BENEFITS]: [], [PageTypeEnum.STRUCTURE]: [], [PageTypeEnum.HOW_TO]: [], [PageTypeEnum.ORGANIZATION]: [], [PageTypeEnum.STATIC_CONTENT]: [], [PageTypeEnum.CONTENT]: [], [PageTypeEnum.WHO_WE_ARE]: [], [PageTypeEnum.TRANSPARENT_ADMINISTRATION]: [ PageSubtypeEnum.TRANSPARENT_ADMINISTRATION_PAYMENTS, PageSubtypeEnum.TRANSPARENT_ADMINISTRATION_CALLS_FOR_TENDERS, ], } satisfies Record; export const getAllowedSubtypes = (type: PageTypes): PageSubtypes[] => { return PAGE_SUBTYPE_BY_TYPE[type] ?? []; }; export const SectionTypeEnum = { HIGHLIGHTED: 'Highlighted', HIGHLIGHTED_SINGLE: 'HighlightedSingle', SERVICE_HIGHLIGHTED: 'ServiceHighlighted', STRUCTURE_HIGHLIGHTED: 'StructureHighlighted', SERVICES_BENEFITS: 'ServicesBenefits', FSE: 'FSE', HOW_TO: 'HowTo', COMMUNICATION: 'Communication', EVERYTHING_ABOUT: 'EverythingAbout', LATEST_NEWS: 'LatestNews', EXPLORE_CATEGORIES: 'ExploreCategories', FEEDBACK: 'Feedback', TALK_ABOUT: 'TalkAbout', ENTITY_TYPES_BY_CATEGORY: 'EntityTypesByCategory', EMERGENCY: 'Emergency', ANNOUNCEMENTS: 'Announcements', RICH_TEXT: 'RichText', FOLDER: 'Folder', // Used for amministrazione-trasparente FILES: 'Files', // Used for amministrazione-trasparente SLIDER: 'Slider', PEOPLE_TERMINATED: 'PeopleTerminated', PEOPLE_MANAGERIAL_POSITIONS: 'PeopleManagerialPositions', ORGANIZATIONAL_CHART: 'OrganizationalChart', PAYMENTS: 'Payments', TENDERS_TABLE: 'TendersTable', } as const export type SectionTypes = GetValues export const PaymentCategoryEnum = { CURRENT_EXPENDITURES: 'currentExpenditures', CAPITAL_EXPENDITURES: 'capitalExpenditures', }; export type PaymentCategoryTypes = GetValues export const CurrentExpenditureTypeEnum = { GOODS_AND_SERVICES: 'goodsAndServices', OPERATING_GRANTS: 'operatingGrants', INTEREST_EXPENSES: 'interestExpenses', OTHER_FINANCIAL_EXPENSES: 'otherFinancialExpenses', OTHER_CURRENT_EXPENDITURES: 'otherCurrentExpenditures', }; export type CurrentExpenditureTypes = GetValues export const CapitalExpenditureTypeEnum = { INVESTMENTS_IN_TANGIBLE_ASSETS: 'investmentsInTangibleAssets', INVESTMENTS_IN_INTANGIBLE_ASSETS: 'investmentsInIntangibleAssets', INVESTMENTS_IN_FINANCIAL_ASSETS: 'investmentsInFinancialAssets', CAPITAL_GRANTS: 'capitalGrants', OTHER_CAPITAL_EXPENDITURES: 'otherCapitalExpenditures', }; export type CapitalExpenditureTypes = GetValues // Announcement Types - ANAC Delibera 264/2023 export const AnnouncementTypeEnum = { ORDINARY: 'Ordinary', SPONSORSHIP: 'Sponsorship', PROJECT_FINANCE: 'ProjectFinance', LOCAL_PUBLIC_SERVICE: 'LocalPublicService', EMERGENCY: 'Emergency' } as const export type AnnouncementType = GetValues export type AnnouncementTypes = AnnouncementType // alias for backwards compatibility // Announcement Phase Types export const AnnouncementPhaseTypeEnum = { PUBLICATION: 'Publication', AWARD: 'Award', EXECUTION: 'Execution', SPONSORSHIP: 'Sponsorship', PROJECT_FINANCE: 'ProjectFinance', LOCAL_PUBLIC_SERVICE: 'LocalPublicService', EMERGENCY: 'Emergency' } as const export type AnnouncementPhaseType = GetValues // Phase Status export const AnnouncementPhaseStatusEnum = { DRAFT: 'draft', PUBLISHED: 'published', ARCHIVED: 'archived' } as const export type AnnouncementPhaseStatus = GetValues // Notice Type (Publication phase) export const NoticeTypeEnum = { BANDO: 'bando', AVVISO: 'avviso', LETTERA_INVITO: 'lettera_invito' } as const export type NoticeType = GetValues // Debate Type (Publication phase) export const DebateTypeEnum = { FACOLTATIVO: 'facoltativo', OBBLIGATORIO: 'obbligatorio' } as const export type DebateType = GetValues // Evaluation Outcome (ProjectFinance phase) export const EvaluationOutcomeEnum = { APPROVED: 'approved', REJECTED: 'rejected', APPROVED_WITH_MODIFICATIONS: 'approved_with_modifications' } as const export type EvaluationOutcome = GetValues // Sponsorship Type export const SponsorshipTypeEnum = { SEARCH: 'search', RECEIVED_PROPOSAL: 'received_proposal' } as const export type SponsorshipType = GetValues // Intervention Type (Emergency phase) export const InterventionTypeEnum = { LAVORI: 'lavori', SERVIZI: 'servizi', FORNITURE: 'forniture' } as const export type InterventionType = GetValues // Phase Configuration export const PHASE_CONFIG: Record< AnnouncementType, { phases: AnnouncementPhaseType[] isSequential: boolean } > = { [AnnouncementTypeEnum.ORDINARY]: { phases: [ AnnouncementPhaseTypeEnum.PUBLICATION, AnnouncementPhaseTypeEnum.AWARD, AnnouncementPhaseTypeEnum.EXECUTION ], isSequential: true }, [AnnouncementTypeEnum.SPONSORSHIP]: { phases: [AnnouncementPhaseTypeEnum.SPONSORSHIP], isSequential: false }, [AnnouncementTypeEnum.PROJECT_FINANCE]: { phases: [AnnouncementPhaseTypeEnum.PROJECT_FINANCE], isSequential: false }, [AnnouncementTypeEnum.LOCAL_PUBLIC_SERVICE]: { phases: [AnnouncementPhaseTypeEnum.LOCAL_PUBLIC_SERVICE], isSequential: false }, [AnnouncementTypeEnum.EMERGENCY]: { phases: [AnnouncementPhaseTypeEnum.EMERGENCY], isSequential: false } } // ========================================== // TENDER Types - Bandi di gara e contratti // ========================================== // Tender Types - ANAC Delibera 264/2023 export const TenderTypeEnum = { ORDINARY: 'Ordinary', SPONSORSHIP: 'Sponsorship', PROJECT_FINANCE: 'ProjectFinance', LOCAL_PUBLIC_SERVICE: 'LocalPublicService', EMERGENCY: 'Emergency' } as const export type TenderType = GetValues export type TenderTypes = TenderType // alias for backwards compatibility // Tender Phase Types export const TenderPhaseTypeEnum = { PUBLICATION: 'Publication', AWARD: 'Award', EXECUTION: 'Execution', SPONSORSHIP: 'Sponsorship', PROJECT_FINANCE: 'ProjectFinance', LOCAL_PUBLIC_SERVICE: 'LocalPublicService', EMERGENCY: 'Emergency' } as const export type TenderPhaseType = GetValues // Tender Phase Status export const TenderPhaseStatusEnum = { DRAFT: 'draft', PUBLISHED: 'published', ARCHIVED: 'archived' } as const export type TenderPhaseStatus = GetValues // Tender Procedure Types - D.Lgs. 36/2023 (Codice Appalti) export const TenderProcedureTypeEnum = { OPEN: 'Open', // Procedura aperta (art. 71) RESTRICTED: 'Restricted', // Procedura ristretta (art. 72) COMPETITIVE_NEGOTIATION: 'CompetitiveNegotiation', // Procedura competitiva con negoziazione (art. 73) COMPETITIVE_DIALOGUE: 'CompetitiveDialogue', // Dialogo competitivo (art. 74) INNOVATION_PARTNERSHIP: 'InnovationPartnership', // Partenariato per l'innovazione (art. 75) NEGOTIATED_WITHOUT_PUBLICATION: 'NegotiatedWithoutPublication', // Procedura negoziata senza pubblicazione (art. 76) DIRECT_AWARD: 'DirectAward', // Affidamento diretto (art. 50) NEGOTIATED_WITH_PUBLICATION: 'NegotiatedWithPublication', // Procedura negoziata con pubblicazione FRAMEWORK_AGREEMENT: 'FrameworkAgreement', // Accordo quadro (art. 59) DYNAMIC_PURCHASING_SYSTEM: 'DynamicPurchasingSystem' // Sistema dinamico di acquisizione (art. 60) } as const export type TenderProcedureType = GetValues // Tender Contract Sector - Settore del contratto export const TenderContractSectorEnum = { WORKS: 'Works', // Lavori SERVICES: 'Services', // Servizi SUPPLIES: 'Supplies' // Forniture } as const export type TenderContractSector = GetValues // Tender Phase Configuration export const TENDER_PHASE_CONFIG: Record< TenderType, { phases: TenderPhaseType[] isSequential: boolean } > = { [TenderTypeEnum.ORDINARY]: { phases: [ TenderPhaseTypeEnum.PUBLICATION, TenderPhaseTypeEnum.AWARD, TenderPhaseTypeEnum.EXECUTION ], isSequential: true }, [TenderTypeEnum.SPONSORSHIP]: { phases: [TenderPhaseTypeEnum.SPONSORSHIP], isSequential: false }, [TenderTypeEnum.PROJECT_FINANCE]: { phases: [TenderPhaseTypeEnum.PROJECT_FINANCE], isSequential: false }, [TenderTypeEnum.LOCAL_PUBLIC_SERVICE]: { phases: [TenderPhaseTypeEnum.LOCAL_PUBLIC_SERVICE], isSequential: false }, [TenderTypeEnum.EMERGENCY]: { phases: [TenderPhaseTypeEnum.EMERGENCY], isSequential: false } } export const ContestTypeEnum = { EXTERNAL: 'External', INTERNAL: 'Internal', } as const export type contestsTypes = GetValues export const OrganizationStructureEnum = { GENERAL_DIRECTION: 'GeneralDirection', UO: 'UO', PERSONNEL: 'Personnel', } as const export type OrganizationStructure = GetValues export const RegisterTypeEnum = { DIRECTOR_DETERMINED: 'DirectorDetermined', MANAGER_DETERMINED: 'ManagerDetermined', } as const export type RegisterTypes = GetValues export const ElementTypeEnum = { AVATAR: 'Avatar', CARD_BASIC: 'CardBasic', CARD_EVENT: 'CardEvent', CARD_FEATURED: 'CardFeatured', CARD_LIFE: 'CardLife', 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: 'Card', CHIP_LINK: 'ChipLink', ICONS: 'Icons', INDEX: 'Index', LINK: 'Link', PLACEHOLDER: 'Placeholder', SLIDER: 'Slider', } as const export type ElementTypes = GetValues export const EntityTypeTypesEnum = { PARENT: 'Parent', CHILD: 'Child', } as const export type EntityTypeTypes = GetValues export const CategoriesUrlEnum = { SERVIZI_E_PRESTAZIONI: 'servizi-e-prestazioni', ASL_COMUNICA: 'ast-comunica', AST_COMUNICA: 'ast-comunica', STRUTTURE: 'strutture', ORGANIZZAZIONE: 'organizzazione', COME_FARE_PER: 'come-fare-per', DEDICATED_TO: 'dedicated-to', } as const export type CategoryUrls = GetValues