From cb70e2c823856963de8d94e9c91635830e5cc9e8 Mon Sep 17 00:00:00 2001 From: almog8k Date: Wed, 5 Nov 2025 09:59:20 +0200 Subject: [PATCH 1/3] feat: update partSchema to remove UUID validation and add report types --- src/schemas/ingestion/polygonParts.schema.ts | 2 +- src/types/ingestion/index.ts | 1 + src/types/ingestion/report.type.ts | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 src/types/ingestion/report.type.ts diff --git a/src/schemas/ingestion/polygonParts.schema.ts b/src/schemas/ingestion/polygonParts.schema.ts index 8b2b8bf..a290b07 100644 --- a/src/schemas/ingestion/polygonParts.schema.ts +++ b/src/schemas/ingestion/polygonParts.schema.ts @@ -6,7 +6,7 @@ import { polygonPartsEntityPatternSchema } from './layerNameFormats.schema'; export const partSchema = z .object({ - id: z.string().uuid({ message: 'Part id should be a valid uuid' }), + id: z.string(), sourceId: z.string({ message: 'Source id should be a string' }).optional(), sourceName: z.string({ message: 'Source name should be a string' }).min(1, { message: 'Source name should have length of at least 1' }), description: z.string({ message: 'Description should be a string' }).optional(), diff --git a/src/types/ingestion/index.ts b/src/types/ingestion/index.ts index d465150..0bd3c01 100644 --- a/src/types/ingestion/index.ts +++ b/src/types/ingestion/index.ts @@ -2,3 +2,4 @@ export * from './layer.type'; export * from './job.type'; export * from './task.type'; export * from './polygonParts.type'; +export * from './report.type'; diff --git a/src/types/ingestion/report.type.ts b/src/types/ingestion/report.type.ts new file mode 100644 index 0000000..6970ee2 --- /dev/null +++ b/src/types/ingestion/report.type.ts @@ -0,0 +1,9 @@ +export interface PolygonPartValidationError { + id: string; + errors: string[]; +} +export interface PolygonPartsValidationResponseBody { + parts: PolygonPartValidationError[]; + smallGeometriesCount: number; // count in this chunk + smallHolesCount: number; // count in this chunk +} From 9d8874e5207fef2b9f5dbe6ff35e741cbc5fcc7a Mon Sep 17 00:00:00 2001 From: almog8k Date: Wed, 5 Nov 2025 10:03:08 +0200 Subject: [PATCH 2/3] chore: remove comments --- src/types/ingestion/report.type.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/ingestion/report.type.ts b/src/types/ingestion/report.type.ts index 6970ee2..96692e2 100644 --- a/src/types/ingestion/report.type.ts +++ b/src/types/ingestion/report.type.ts @@ -4,6 +4,6 @@ export interface PolygonPartValidationError { } export interface PolygonPartsValidationResponseBody { parts: PolygonPartValidationError[]; - smallGeometriesCount: number; // count in this chunk - smallHolesCount: number; // count in this chunk + smallGeometriesCount: number; + smallHolesCount: number; } From e33162ed8e6c5baa71f42b801d28f786a6cffc64 Mon Sep 17 00:00:00 2001 From: almog8k Date: Wed, 5 Nov 2025 10:36:46 +0200 Subject: [PATCH 3/3] refactor: rename PolygonPartsValidationResponseBody to PolygonPartsChunkValidationResult --- 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 96692e2..8dd5e81 100644 --- a/src/types/ingestion/report.type.ts +++ b/src/types/ingestion/report.type.ts @@ -2,7 +2,7 @@ export interface PolygonPartValidationError { id: string; errors: string[]; } -export interface PolygonPartsValidationResponseBody { +export interface PolygonPartsChunkValidationResult { parts: PolygonPartValidationError[]; smallGeometriesCount: number; smallHolesCount: number;