@bpd-library/utilities 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -44,4 +44,5 @@ interface ExtendedAreaProject extends Pick<AreaProjectModel, 'id' | typeof INCLU
|
|
|
44
44
|
mapDataItems?: MapDataItem[];
|
|
45
45
|
objectType: 'areaProject';
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
declare type ExtendedApiObject = ExtendedConstructionNumber | ExtendedApartmentBuilding | ExtendedPropertyType | ExtendedProjectPhase | ExtendedDistrict;
|
|
48
|
+
export { ExtendedConstructionNumber, ExtendedPropertyType, ExtendedApartmentBuilding, ExtendedProjectPhase, ExtendedDistrict, ExtendedAreaProject, ExtendedApiObject, PropertyTypeStatus, ApartmentBuildingStatus, GeneratedConstructionNumberStatus, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-utilities.types.js","sourceRoot":"","sources":["../../src/api-utilities/api-utilities.types.ts"],"names":[],"mappings":"","sourcesContent":["import { MapDataItem } from '@bpd-library/types';\n\nimport { INCLUDED_PROPERTIES } from '../extended-api-models/included-properties';\nimport {\n ApartmentBuildingModel,\n AreaProjectModel,\n ConstructionNumberModel,\n DistrictModel,\n ProjectPhaseModel,\n ProjectPhaseStatus,\n PropertyTypeModel,\n} from '../generated';\n\ntype PropertyTypeStatus =\n | 'InPreparation'\n | 'SaleSoon'\n | 'SaleStarted'\n | 'AssigningOn'\n | 'AmountAvailable'\n | 'InOption'\n | 'Sold'\n | 'UnderConstruction'\n | 'ForRent'\n | 'Rented';\n\ntype ApartmentBuildingStatus =\n | 'InPreparation'\n | 'SaleSoon'\n | 'SaleStarted'\n | 'AssigningOn'\n | 'AmountAvailable'\n | 'Available'\n | 'ForRent'\n | 'InOption'\n | 'Sold'\n | 'Rented'\n | 'UnderConstruction';\n\ntype GeneratedConstructionNumberStatus =\n | 'InPreparation'\n | 'InOption'\n | 'Available'\n | 'Sold'\n | 'Rented'\n | 'Reserved'\n | 'UnderConstruction';\n\ninterface ExtendedConstructionNumber\n extends Pick<\n ConstructionNumberModel,\n 'id' | typeof INCLUDED_PROPERTIES.constructionNumber[number]\n > {\n areaProject?: AreaProjectModel;\n propertyType?: ExtendedPropertyType;\n projectPhase?: ExtendedProjectPhase;\n mapDataItems?: MapDataItem[];\n apartmentBuilding?: ExtendedApartmentBuilding;\n status?: GeneratedConstructionNumberStatus;\n objectType: 'constructionNumber';\n}\n\ninterface ExtendedPropertyType\n extends Pick<PropertyTypeModel, 'id' | typeof INCLUDED_PROPERTIES.propertyType[number]> {\n constructionNumbers?: ExtendedConstructionNumber[];\n projectPhase?: ExtendedProjectPhase;\n mapDataItems?: MapDataItem[];\n status?: PropertyTypeStatus;\n apartmentBuildings?: ExtendedApartmentBuilding[];\n objectType: 'propertyType';\n}\n\ninterface ExtendedProjectPhase\n extends Pick<ProjectPhaseModel, 'id' | typeof INCLUDED_PROPERTIES.projectPhase[number]> {\n constructionNumbers?: ExtendedConstructionNumber[];\n propertyTypes?: ExtendedPropertyType[];\n mapDataItems?: MapDataItem[];\n objectType: 'projectPhase';\n}\n\ninterface ExtendedApartmentBuilding\n extends Pick<\n ApartmentBuildingModel,\n 'id' | typeof INCLUDED_PROPERTIES.apartmentBuilding[number]\n > {\n constructionNumbers?: ExtendedConstructionNumber[];\n propertyTypes?: ExtendedPropertyType[];\n projectPhase?: ExtendedProjectPhase;\n mapDataItems?: MapDataItem[];\n status?: ApartmentBuildingStatus;\n objectType: 'apartmentBuilding';\n}\n\ninterface ExtendedDistrict\n extends Pick<DistrictModel, 'id' | typeof INCLUDED_PROPERTIES.district[number]> {\n status?: ProjectPhaseStatus;\n mapDataItems?: MapDataItem[];\n objectType: 'district';\n}\n\ninterface ExtendedAreaProject\n extends Pick<AreaProjectModel, 'id' | typeof INCLUDED_PROPERTIES.areaProject[number]> {\n mapDataItems?: MapDataItem[];\n objectType: 'areaProject';\n}\n\nexport {\n ExtendedConstructionNumber,\n ExtendedPropertyType,\n ExtendedApartmentBuilding,\n ExtendedProjectPhase,\n ExtendedDistrict,\n ExtendedAreaProject,\n PropertyTypeStatus,\n ApartmentBuildingStatus,\n GeneratedConstructionNumberStatus,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"api-utilities.types.js","sourceRoot":"","sources":["../../src/api-utilities/api-utilities.types.ts"],"names":[],"mappings":"","sourcesContent":["import { MapDataItem } from '@bpd-library/types';\n\nimport { INCLUDED_PROPERTIES } from '../extended-api-models/included-properties';\nimport {\n ApartmentBuildingModel,\n AreaProjectModel,\n ConstructionNumberModel,\n DistrictModel,\n ProjectPhaseModel,\n ProjectPhaseStatus,\n PropertyTypeModel,\n} from '../generated';\n\ntype PropertyTypeStatus =\n | 'InPreparation'\n | 'SaleSoon'\n | 'SaleStarted'\n | 'AssigningOn'\n | 'AmountAvailable'\n | 'InOption'\n | 'Sold'\n | 'UnderConstruction'\n | 'ForRent'\n | 'Rented';\n\ntype ApartmentBuildingStatus =\n | 'InPreparation'\n | 'SaleSoon'\n | 'SaleStarted'\n | 'AssigningOn'\n | 'AmountAvailable'\n | 'Available'\n | 'ForRent'\n | 'InOption'\n | 'Sold'\n | 'Rented'\n | 'UnderConstruction';\n\ntype GeneratedConstructionNumberStatus =\n | 'InPreparation'\n | 'InOption'\n | 'Available'\n | 'Sold'\n | 'Rented'\n | 'Reserved'\n | 'UnderConstruction';\n\ninterface ExtendedConstructionNumber\n extends Pick<\n ConstructionNumberModel,\n 'id' | typeof INCLUDED_PROPERTIES.constructionNumber[number]\n > {\n areaProject?: AreaProjectModel;\n propertyType?: ExtendedPropertyType;\n projectPhase?: ExtendedProjectPhase;\n mapDataItems?: MapDataItem[];\n apartmentBuilding?: ExtendedApartmentBuilding;\n status?: GeneratedConstructionNumberStatus;\n objectType: 'constructionNumber';\n}\n\ninterface ExtendedPropertyType\n extends Pick<PropertyTypeModel, 'id' | typeof INCLUDED_PROPERTIES.propertyType[number]> {\n constructionNumbers?: ExtendedConstructionNumber[];\n projectPhase?: ExtendedProjectPhase;\n mapDataItems?: MapDataItem[];\n status?: PropertyTypeStatus;\n apartmentBuildings?: ExtendedApartmentBuilding[];\n objectType: 'propertyType';\n}\n\ninterface ExtendedProjectPhase\n extends Pick<ProjectPhaseModel, 'id' | typeof INCLUDED_PROPERTIES.projectPhase[number]> {\n constructionNumbers?: ExtendedConstructionNumber[];\n propertyTypes?: ExtendedPropertyType[];\n mapDataItems?: MapDataItem[];\n objectType: 'projectPhase';\n}\n\ninterface ExtendedApartmentBuilding\n extends Pick<\n ApartmentBuildingModel,\n 'id' | typeof INCLUDED_PROPERTIES.apartmentBuilding[number]\n > {\n constructionNumbers?: ExtendedConstructionNumber[];\n propertyTypes?: ExtendedPropertyType[];\n projectPhase?: ExtendedProjectPhase;\n mapDataItems?: MapDataItem[];\n status?: ApartmentBuildingStatus;\n objectType: 'apartmentBuilding';\n}\n\ninterface ExtendedDistrict\n extends Pick<DistrictModel, 'id' | typeof INCLUDED_PROPERTIES.district[number]> {\n status?: ProjectPhaseStatus;\n mapDataItems?: MapDataItem[];\n objectType: 'district';\n}\n\ninterface ExtendedAreaProject\n extends Pick<AreaProjectModel, 'id' | typeof INCLUDED_PROPERTIES.areaProject[number]> {\n mapDataItems?: MapDataItem[];\n objectType: 'areaProject';\n}\n\ntype ExtendedApiObject =\n | ExtendedConstructionNumber\n | ExtendedApartmentBuilding\n | ExtendedPropertyType\n | ExtendedProjectPhase\n | ExtendedDistrict;\n\nexport {\n ExtendedConstructionNumber,\n ExtendedPropertyType,\n ExtendedApartmentBuilding,\n ExtendedProjectPhase,\n ExtendedDistrict,\n ExtendedAreaProject,\n ExtendedApiObject,\n PropertyTypeStatus,\n ApartmentBuildingStatus,\n GeneratedConstructionNumberStatus,\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExtendedApiObject } from '../../api-utilities';
|
|
2
2
|
import { ExtendedAreaModels } from '../extended-area';
|
|
3
|
-
declare const findExtendedObjectById: ({ constructionNumbers, propertyTypes, apartmentBuildings, projectPhases, districts, }: ExtendedAreaModels, id: string) =>
|
|
3
|
+
declare const findExtendedObjectById: ({ constructionNumbers, propertyTypes, apartmentBuildings, projectPhases, districts, }: ExtendedAreaModels, id: string) => ExtendedApiObject | undefined;
|
|
4
4
|
export { findExtendedObjectById };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-extended-object.js","sourceRoot":"","sources":["../../../src/extended-api-models/utilities/find-extended-object.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"find-extended-object.js","sourceRoot":"","sources":["../../../src/extended-api-models/utilities/find-extended-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,GACnB,MAAM,qBAAqB,CAAC;AAS7B,MAAM,sBAAsB,GAAG,CAC3B,EACI,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,SAAS,GACQ,EACrB,EAAU,EACmB,EAAE;IAC/B,MAAM,kBAAkB,GAAG,sBAAsB,CAAC,mBAAmB,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/E,IAAI,kBAAkB;QAAE,OAAO,kBAAkB,CAAC;IAElD,MAAM,YAAY,GAAG,gBAAgB,CAAC,aAAa,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC7D,IAAI,YAAY;QAAE,OAAO,YAAY,CAAC;IAEtC,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,kBAAkB,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5E,IAAI,iBAAiB;QAAE,OAAO,iBAAiB,CAAC;IAEhD,MAAM,YAAY,GAAG,gBAAgB,CAAC,aAAa,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC7D,IAAI,YAAY;QAAE,OAAO,YAAY,CAAC;IAEtC,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAClE,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAE9B,OAAO;AACX,CAAC,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC","sourcesContent":["import {\n ExtendedApiObject,\n findApartmentBuilding,\n findConstructionNumber,\n findProjectPhase,\n findPropertyType,\n} from '../../api-utilities';\nimport { ExtendedAreaModels } from '../extended-area';\n\n/**\n * @description Finds and returns the extended API Object with the set id.\n * @param {ExtendedAreaModels} { constructionNumbers, propertyTypes, apartmentBuildings, projectPhases }\n * @param {string} id\n * @return {*} {(ExtendedApiObject | undefined)}\n */\nconst findExtendedObjectById = (\n {\n constructionNumbers,\n propertyTypes,\n apartmentBuildings,\n projectPhases,\n districts,\n }: ExtendedAreaModels,\n id: string,\n): ExtendedApiObject | undefined => {\n const constructionNumber = findConstructionNumber(constructionNumbers, { id });\n if (constructionNumber) return constructionNumber;\n\n const propertyType = findPropertyType(propertyTypes, { id });\n if (propertyType) return propertyType;\n\n const apartmentBuilding = findApartmentBuilding(apartmentBuildings, { id });\n if (apartmentBuilding) return apartmentBuilding;\n\n const projectPhase = findProjectPhase(projectPhases, { id });\n if (projectPhase) return projectPhase;\n\n const district = districts.find((district) => district.id === id);\n if (district) return district;\n\n return;\n};\n\nexport { findExtendedObjectById };\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpd-library/utilities",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"description": "Description",
|
|
5
5
|
"url": "https://github.com/{repo name}",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "7c087a42e3fc54ae801c2456118ceebf69e35eaa",
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@atomify/core": "2.4.1",
|
|
51
51
|
"@atomify/hooks": "1.1.11",
|
|
52
52
|
"@atomify/jsx": "1.7.1",
|
|
53
53
|
"@atomify/kit": "1.1.11",
|
|
54
|
-
"@bpd-library/types": "^1.3.
|
|
54
|
+
"@bpd-library/types": "^1.3.6",
|
|
55
55
|
"qs": "^6.9.4",
|
|
56
56
|
"query-string": "5"
|
|
57
57
|
}
|