import { MapDataItem } from '@bpd-library/types'; import { INCLUDED_PROPERTIES } from '../extended-api-models/included-properties'; import { ApartmentBuildingModel, AreaProjectModel, AreaStatus, ConstructionNumberModel, DistrictModel, ProjectPhaseModel, ProjectPhaseStatus, PropertyTypeModel } from '../generated'; type PropertyTypeStatus = 'InPreparation' | 'SaleSoon' | 'SaleStarted' | 'AssigningOn' | 'AmountAvailable' | 'InOption' | 'Sold' | 'UnderConstruction' | 'ForRent' | 'Rented'; type ApartmentBuildingStatus = 'InPreparation' | 'SaleSoon' | 'SaleStarted' | 'AssigningOn' | 'AmountAvailable' | 'Available' | 'ForRent' | 'InOption' | 'Sold' | 'Rented' | 'UnderConstruction'; type GeneratedConstructionNumberStatus = 'InPreparation' | 'InOption' | 'Available' | 'AssigningOn' | 'Sold' | 'Rented' | 'Reserved' | 'UnderConstruction'; interface ExtendedConstructionNumber extends Pick { areaProject?: ExtendedAreaProject; propertyType?: ExtendedPropertyType; projectPhase?: ExtendedProjectPhase; mapDataItems?: MapDataItem[]; apartmentBuilding?: ExtendedApartmentBuilding; status?: GeneratedConstructionNumberStatus; objectType: 'constructionNumber'; } interface ExtendedPropertyType extends Pick { constructionNumbers?: ExtendedConstructionNumber[]; projectPhase?: ExtendedProjectPhase; mapDataItems?: MapDataItem[]; status?: PropertyTypeStatus; apartmentBuildings?: ExtendedApartmentBuilding[]; objectType: 'propertyType'; } interface ExtendedProjectPhase extends Pick { constructionNumbers?: ExtendedConstructionNumber[]; propertyTypes?: ExtendedPropertyType[]; mapDataItems?: MapDataItem[]; objectType: 'projectPhase'; } interface ExtendedApartmentBuilding extends Pick { constructionNumbers?: ExtendedConstructionNumber[]; propertyTypes?: ExtendedPropertyType[]; projectPhase?: ExtendedProjectPhase; mapDataItems?: MapDataItem[]; status?: ApartmentBuildingStatus; objectType: 'apartmentBuilding'; } interface ExtendedDistrict extends Pick { status?: ProjectPhaseStatus; mapDataItems?: MapDataItem[]; objectType: 'district'; } interface ExtendedAreaProject extends Pick { status?: AreaStatus; mapDataItems?: MapDataItem[]; objectType: 'areaProject'; } type ExtendedApiObject = ExtendedConstructionNumber | ExtendedApartmentBuilding | ExtendedPropertyType | ExtendedProjectPhase | ExtendedDistrict | ExtendedAreaProject; export { ExtendedConstructionNumber, ExtendedPropertyType, ExtendedApartmentBuilding, ExtendedProjectPhase, ExtendedDistrict, ExtendedAreaProject, ExtendedApiObject, PropertyTypeStatus, ApartmentBuildingStatus, GeneratedConstructionNumberStatus, };