Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/MapColonies/mc-models int…
Browse files Browse the repository at this point in the history
…o sourceId_pp_record
  • Loading branch information
Eliav-Maimon committed Dec 2, 2024
2 parents 2a07648 + b2d1bdc commit 3ca2614
Show file tree
Hide file tree
Showing 23 changed files with 382 additions and 185 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: Test Reporters
name: Test Reporters Node-${{ matrix.node }}
path: reports/**

64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,70 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [17.13.0](https://github.com/MapColonies/mc-models/compare/v17.12.2...v17.13.0) (2024-11-28)


### Features

* adding polygon-parts table name type and valdiation ([#241](https://github.com/MapColonies/mc-models/issues/241)) ([e1f1621](https://github.com/MapColonies/mc-models/commit/e1f16217088403e7b749c175f786ad28c76bff6b))

### [17.12.2](https://github.com/MapColonies/mc-models/compare/v17.12.1...v17.12.2) (2024-11-28)


### Bug Fixes

* additional properties ([#240](https://github.com/MapColonies/mc-models/issues/240)) ([0370d86](https://github.com/MapColonies/mc-models/commit/0370d8622d78808a983c185430745d646e2a0076))

### [17.12.1](https://github.com/MapColonies/mc-models/compare/v17.12.0...v17.12.1) (2024-11-27)


### Bug Fixes

* revert to old update request and add edit request ([#239](https://github.com/MapColonies/mc-models/issues/239)) ([7069117](https://github.com/MapColonies/mc-models/commit/70691175af3b7b33b3de27ff37ad303b3bfa92a4))

## [17.12.0](https://github.com/MapColonies/mc-models/compare/v17.11.3...v17.12.0) (2024-11-26)


### Features

* aggregation validation ([#238](https://github.com/MapColonies/mc-models/issues/238)) ([c9f8a64](https://github.com/MapColonies/mc-models/commit/c9f8a6435cd6e86add2108b01f596669814a5ff1))

### [17.11.3](https://github.com/MapColonies/mc-models/compare/v17.11.2...v17.11.3) (2024-11-25)


### Bug Fixes

* remove description ([#237](https://github.com/MapColonies/mc-models/issues/237)) ([083aafd](https://github.com/MapColonies/mc-models/commit/083aafd56dfd2d925db13c68e594a7eed6cff35e))

### [17.11.2](https://github.com/MapColonies/mc-models/compare/v17.11.1...v17.11.2) (2024-11-25)

### [17.11.1](https://github.com/MapColonies/mc-models/compare/v17.11.0...v17.11.1) (2024-11-25)

## [17.11.0](https://github.com/MapColonies/mc-models/compare/v17.10.4...v17.11.0) (2024-11-25)


### Features

* aggregation layer metadata ([#234](https://github.com/MapColonies/mc-models/issues/234)) ([153c12c](https://github.com/MapColonies/mc-models/commit/153c12cfa8a611d64becdd5f266d98468766df3a))

### [17.10.4](https://github.com/MapColonies/mc-models/compare/v17.10.3...v17.10.4) (2024-11-24)


### Bug Fixes

* update yaml and types for raster catalog manager bugs ([#233](https://github.com/MapColonies/mc-models/issues/233)) ([d65072a](https://github.com/MapColonies/mc-models/commit/d65072a7ec8e704124e56fe7560534c7207d6430))

### [17.10.3](https://github.com/MapColonies/mc-models/compare/v17.10.2...v17.10.3) (2024-11-17)

### [17.10.2](https://github.com/MapColonies/mc-models/compare/v17.10.1...v17.10.2) (2024-11-13)


### Bug Fixes

* add isPartial class to ICatalogDBEntityMapping ([#229](https://github.com/MapColonies/mc-models/issues/229)) ([aa60fed](https://github.com/MapColonies/mc-models/commit/aa60fedf4caefb5ec9f1d641b39c9d0d36bc1add))
* cleanup inputmapping decorator not relevant ([#231](https://github.com/MapColonies/mc-models/issues/231)) ([250f983](https://github.com/MapColonies/mc-models/commit/250f9830177a05cb1c4d456c9b10064e24c1f208))
* pp islivecycleenvolved in layerrecord tuning ([#230](https://github.com/MapColonies/mc-models/issues/230)) ([d316873](https://github.com/MapColonies/mc-models/commit/d316873b87f7efc0e198de2c9f213857468854be))

### [17.10.1](https://github.com/MapColonies/mc-models/compare/v17.10.0...v17.10.1) (2024-11-12)

## [17.10.0](https://github.com/MapColonies/mc-models/compare/v17.9.3...v17.10.0) (2024-11-12)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@map-colonies/mc-model-types",
"version": "17.10.1",
"version": "17.13.0",
"description": "json schemas for validations and generated ts models",
"author": "",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const catalogDbEntityMetadataKey = Symbol('catalogdbentitymapping');
export interface ICatalogDBEntityMapping {
table: string; // database table name
className: string;
isPartial?: boolean; // if isPartial is true, the Entity decorator will not be generated
}

export function catalogDBEntity(catalogdbentitymapping: ICatalogDBEntityMapping): ClassDecorator {
Expand Down
100 changes: 9 additions & 91 deletions src/models/layerMetadata/layerMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { NewRasterLayerMetadata, UpdateRasterLayerMetadata } from '../raster/ing
import { VALIDATIONS } from '../raster/constants';
import { IMetadataCommonModel } from './interfaces/metadataCommonModel';
import { getPyCSWMapping, IPYCSWMapping, pycsw } from './decorators/property/csw.decorator';
import { getInputDataMapping, IDataMapping, DataFileType, inputDataMapping, IPropSHPMapping } from './decorators/property/shp.decorator';
import { getInputDataMapping, IDataMapping, IPropSHPMapping } from './decorators/property/shp.decorator';
import { getCatalogDBMapping, ICatalogDBMapping, catalogDB, ORMColumnType } from './decorators/property/catalogDB.decorator';
import { getTsTypesMapping, tsTypes, TsTypes } from './decorators/property/tsTypes.decorator';
import { ProductType, Transparency, TileOutputFormat } from './enums';
Expand Down Expand Up @@ -151,10 +151,6 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
nullable: true,
},
})
@inputDataMapping({
dataFile: DataFileType.SHAPE_METADATA,
valuePath: 'features[0].properties.SourceName',
})
@tsTypes({
mappingType: TsTypes.STRING,
})
Expand Down Expand Up @@ -187,10 +183,6 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
nullable: true,
},
})
@inputDataMapping({
dataFile: DataFileType.SHAPE_METADATA,
valuePath: 'features[0].properties.Dsc',
})
@tsTypes({
mappingType: TsTypes.STRING,
})
Expand Down Expand Up @@ -336,16 +328,11 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
columnType: ORMColumnType.UPDATE_DATE_COLUMN,
},
})
@inputDataMapping({
isCustomLogic: true,
dataFile: DataFileType.SHAPE_METADATA,
valuePath: '***max(features[].properties.UpdateDate)***',
})
@tsTypes({
mappingType: TsTypes.DATE,
})
@graphql({
nullable: true,
nullable: false,
})
@fieldConfig({
category: FieldCategory.MAIN,
Expand All @@ -370,11 +357,6 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
nullable: false,
},
})
@inputDataMapping({
isCustomLogic: true,
dataFile: DataFileType.SHAPE_METADATA,
valuePath: '***min(features[].properties.UpdateDate)***',
})
@tsTypes({
mappingType: TsTypes.DATE,
})
Expand Down Expand Up @@ -419,11 +401,6 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
nullable: false,
},
})
@inputDataMapping({
isCustomLogic: true,
dataFile: DataFileType.SHAPE_METADATA,
valuePath: '***max(features[].properties.UpdateDate)***',
})
@tsTypes({
mappingType: TsTypes.DATE,
})
Expand Down Expand Up @@ -457,15 +434,11 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
type: 'real',
},
})
@inputDataMapping({
dataFile: DataFileType.SHAPE_METADATA,
valuePath: 'features[0].properties.Ep90',
})
@tsTypes({
mappingType: TsTypes.NUMBER,
})
@graphql({
nullable: false, //keep it true like in min?
nullable: false,
})
@fieldConfig({
category: FieldCategory.GEO_INFO,
Expand Down Expand Up @@ -504,15 +477,11 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
type: 'real',
},
})
@inputDataMapping({
dataFile: DataFileType.SHAPE_METADATA,
valuePath: 'features[0].properties.Ep90',
})
@tsTypes({
mappingType: TsTypes.NUMBER,
})
@graphql({
nullable: true,
nullable: false,
})
@fieldConfig({
category: FieldCategory.GEO_INFO,
Expand Down Expand Up @@ -554,11 +523,6 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
overrideType: TsTypes.STRING,
},
})
@inputDataMapping({
isCustomLogic: true,
dataFile: DataFileType.SHAPE_METADATA,
valuePath: '***features[].properties.SensorType***',
})
@tsTypes({
mappingType: TsTypes.STRING_ARRAY,
})
Expand Down Expand Up @@ -595,11 +559,6 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
overrideType: TsTypes.STRING,
},
})
@inputDataMapping({
isCustomLogic: true,
dataFile: DataFileType.SHAPE_METADATA,
valuePath: '***features[].properties.Countries***',
})
@tsTypes({
mappingType: TsTypes.STRING_ARRAY,
})
Expand Down Expand Up @@ -637,11 +596,6 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
nullable: false,
},
})
@inputDataMapping({
isCustomLogic: true,
dataFile: DataFileType.SHAPE_METADATA,
valuePath: '***features[0].properties.Source.Split(-)[0]***',
})
@tsTypes({
mappingType: TsTypes.STRING,
})
Expand Down Expand Up @@ -680,11 +634,6 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
nullable: true,
},
})
@inputDataMapping({
isCustomLogic: true,
dataFile: DataFileType.SHAPE_METADATA,
valuePath: '***features[0].properties.Source.Split(-)[1]***',
})
@tsTypes({
mappingType: TsTypes.STRING,
})
Expand Down Expand Up @@ -723,10 +672,6 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
nullable: false,
},
})
@inputDataMapping({
dataFile: DataFileType.PRODUCT,
valuePath: 'features[0].properties.Type',
})
@tsTypes({
mappingType: TsTypes.PRODUCTTYPE,
})
Expand Down Expand Up @@ -823,10 +768,6 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
type: 'numeric',
},
})
@inputDataMapping({
dataFile: DataFileType.TFW,
valuePath: '[0]',
})
@tsTypes({
mappingType: TsTypes.NUMBER,
})
Expand Down Expand Up @@ -875,21 +816,17 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
type: 'numeric',
},
})
@inputDataMapping({
dataFile: DataFileType.TFW,
valuePath: '[0]',
})
@tsTypes({
mappingType: TsTypes.NUMBER,
})
@graphql({
nullable: false, //keep it true like in max?
nullable: false,
})
@fieldConfig({
category: FieldCategory.MAIN,
infoMsgCode: [
'info-field-tooltip.minResolutionDeg.tooltip',
'info-general-tooltip.required', // is it required?
'info-general-tooltip.required',
'info-field-tooltip.minResolutionDeg.min',
'info-field-tooltip.minResolutionDeg.max',
],
Expand All @@ -909,6 +846,7 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
max: VALIDATIONS.resolutionDeg.max,
},
],
isLifecycleEnvolved: true,
})
//#endregion
public minResolutionDeg: number | undefined = undefined;
Expand All @@ -926,10 +864,6 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
type: 'numeric',
},
})
@inputDataMapping({
dataFile: DataFileType.SHAPE_METADATA,
valuePath: 'features[0].properties.Resolution',
})
@tsTypes({
mappingType: TsTypes.NUMBER,
})
Expand Down Expand Up @@ -973,18 +907,14 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
type: 'numeric',
},
})
@inputDataMapping({
dataFile: DataFileType.SHAPE_METADATA,
valuePath: 'features[0].properties.Resolution',
})
@tsTypes({
mappingType: TsTypes.NUMBER,
})
@graphql({
nullable: true,
nullable: false,
})
@fieldConfig({
category: FieldCategory.MAIN, // is it required?
category: FieldCategory.MAIN,
infoMsgCode: ['info-general-tooltip.required', 'info-field-tooltip.minResolutionMeter.min', 'info-field-tooltip.minResolutionMeter.max'],
validation: [
{
Expand Down Expand Up @@ -1021,10 +951,6 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
nullable: true,
},
})
@inputDataMapping({
dataFile: DataFileType.SHAPE_METADATA,
valuePath: 'features[0].properties.Rms',
})
@tsTypes({
mappingType: TsTypes.NUMBER,
})
Expand All @@ -1048,10 +974,6 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
nullable: true,
},
})
@inputDataMapping({
dataFile: DataFileType.SHAPE_METADATA,
valuePath: 'features[0].properties.Scale',
})
@tsTypes({
mappingType: TsTypes.NUMBER,
})
Expand Down Expand Up @@ -1093,10 +1015,6 @@ export class LayerMetadata implements ILayerMetadata, IMetadataCommonModel {
nullable: false,
},
})
@inputDataMapping({
dataFile: DataFileType.PRODUCT,
valuePath: 'features[0].geometry',
})
@tsTypes({
mappingType: TsTypes.OBJECT,
})
Expand Down
Loading

0 comments on commit 3ca2614

Please sign in to comment.