From b5f46491b14fa1ab78a6632865465fc11fa1dbae Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Sun, 26 Apr 2026 11:35:18 +0300 Subject: [PATCH 1/5] refactor!: change polygon part validation error to new format --- src/types/ingestion/report.type.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/types/ingestion/report.type.ts b/src/types/ingestion/report.type.ts index 3de23c8..55c01f4 100644 --- a/src/types/ingestion/report.type.ts +++ b/src/types/ingestion/report.type.ts @@ -7,6 +7,15 @@ export type PolygonPartValidationErrorsType = Pick< 'RESOLUTION' | 'GEOMETRY_VALIDITY' | 'SMALL_GEOMETRY' | 'SMALL_HOLES' | 'UNKNOWN' >[keyof Pick]; +export type PolygonPartValidationErrorItem = + | { + code: (typeof ValidationErrorType)['RESOLUTION']; + isExceeded: boolean; + } + | { + code: Exclude; + }; + export interface PolygonPartValidationError { id: string; errors: PolygonPartValidationErrorsType[]; From fa1f9adea42ada4afea0ec090aba54758acd6972 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Sun, 26 Apr 2026 12:01:09 +0300 Subject: [PATCH 2/5] fix: use new type for validation error --- src/types/ingestion/report.type.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/ingestion/report.type.ts b/src/types/ingestion/report.type.ts index 55c01f4..7e11f2a 100644 --- a/src/types/ingestion/report.type.ts +++ b/src/types/ingestion/report.type.ts @@ -18,7 +18,7 @@ export type PolygonPartValidationErrorItem = export interface PolygonPartValidationError { id: string; - errors: PolygonPartValidationErrorsType[]; + errors: PolygonPartValidationErrorItem[]; } export interface PolygonPartsChunkValidationResult { parts: PolygonPartValidationError[]; From 37d5a9098e6f164a75115f71d9dbd8ee017b1d19 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Sun, 26 Apr 2026 16:36:51 +0300 Subject: [PATCH 3/5] refactor: split validation error item parts to new types Co-authored-by: Copilot --- src/types/ingestion/report.type.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/types/ingestion/report.type.ts b/src/types/ingestion/report.type.ts index 7e11f2a..d86af9d 100644 --- a/src/types/ingestion/report.type.ts +++ b/src/types/ingestion/report.type.ts @@ -7,14 +7,16 @@ export type PolygonPartValidationErrorsType = Pick< 'RESOLUTION' | 'GEOMETRY_VALIDITY' | 'SMALL_GEOMETRY' | 'SMALL_HOLES' | 'UNKNOWN' >[keyof Pick]; -export type PolygonPartValidationErrorItem = - | { - code: (typeof ValidationErrorType)['RESOLUTION']; - isExceeded: boolean; - } - | { - code: Exclude; - }; +export type PolygonPartValidationResolutionErrorItem = { + code: (typeof ValidationErrorType)['RESOLUTION']; + isExceeded: boolean; +}; + +export type PolygonPartValidationGeneralErrorItem = { + code: Exclude; +}; + +export type PolygonPartValidationErrorItem = PolygonPartValidationResolutionErrorItem | PolygonPartValidationGeneralErrorItem; export interface PolygonPartValidationError { id: string; From 55652e996f321b18ac7bcf8ee6f117f487db7a91 Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Sun, 26 Apr 2026 16:43:26 +0300 Subject: [PATCH 4/5] style: fix lint errors --- src/types/ingestion/report.type.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/types/ingestion/report.type.ts b/src/types/ingestion/report.type.ts index d86af9d..ebd0c47 100644 --- a/src/types/ingestion/report.type.ts +++ b/src/types/ingestion/report.type.ts @@ -7,14 +7,14 @@ export type PolygonPartValidationErrorsType = Pick< 'RESOLUTION' | 'GEOMETRY_VALIDITY' | 'SMALL_GEOMETRY' | 'SMALL_HOLES' | 'UNKNOWN' >[keyof Pick]; -export type PolygonPartValidationResolutionErrorItem = { +export interface PolygonPartValidationResolutionErrorItem { code: (typeof ValidationErrorType)['RESOLUTION']; isExceeded: boolean; -}; +} -export type PolygonPartValidationGeneralErrorItem = { +export interface PolygonPartValidationGeneralErrorItem { code: Exclude; -}; +} export type PolygonPartValidationErrorItem = PolygonPartValidationResolutionErrorItem | PolygonPartValidationGeneralErrorItem; From 8f2e82ee560dc4300857b883c530e1de8b94e3bf Mon Sep 17 00:00:00 2001 From: RonitKissis Date: Sun, 26 Apr 2026 16:51:52 +0300 Subject: [PATCH 5/5] feat: update threshold items --- src/schemas/ingestion/validationTask.schema.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/schemas/ingestion/validationTask.schema.ts b/src/schemas/ingestion/validationTask.schema.ts index 930ddd7..b3e1824 100644 --- a/src/schemas/ingestion/validationTask.schema.ts +++ b/src/schemas/ingestion/validationTask.schema.ts @@ -22,6 +22,7 @@ export const thresholdsSchema = z.object({ count: counterSchema, }), smallGeometries: thresholdCheckSchema.describe('Small geometries threshold check result'), + resolution: thresholdCheckSchema.describe('Resolution threshold check result'), }); export const validationAggregatedErrorsSchema = z.object({