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..8dd5e81 --- /dev/null +++ b/src/types/ingestion/report.type.ts @@ -0,0 +1,9 @@ +export interface PolygonPartValidationError { + id: string; + errors: string[]; +} +export interface PolygonPartsChunkValidationResult { + parts: PolygonPartValidationError[]; + smallGeometriesCount: number; + smallHolesCount: number; +}