From 38fa08d2afd536eddface97221904fc29b0c276f Mon Sep 17 00:00:00 2001 From: almog8k Date: Tue, 22 Sep 2026 14:59:45 +0300 Subject: [PATCH] feat: add cache-deletion job params schema (MAPCO-11779) Add cacheDeletionJobParamsSchema and its inferred CacheDeletionJobParams type for Update_Delete_Cache / Swap_Delete_Cache jobs. The new tasksCreationCompleted flag lets job-tracker avoid completing the job while overseer is still enqueuing task batches. --- src/schemas/deletion/job.schema.ts | 9 +++++++++ src/types/deletion/job.type.ts | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/schemas/deletion/job.schema.ts b/src/schemas/deletion/job.schema.ts index 59a74b8..e6351e2 100644 --- a/src/schemas/deletion/job.schema.ts +++ b/src/schemas/deletion/job.schema.ts @@ -5,3 +5,12 @@ export const deleteLayerJobParamsSchema = z approver: z.string(), }) .describe('deleteLayerJobParamsSchema'); + +//#region CacheDeletionJobParams +export const cacheDeletionJobParamsSchema = z + .object({ + ingestionJobId: z.string().uuid(), + tasksCreationCompleted: z.boolean(), + }) + .describe('cacheDeletionJobParamsSchema'); +//#endregion CacheDeletionJobParams diff --git a/src/types/deletion/job.type.ts b/src/types/deletion/job.type.ts index e4f67e4..01572b4 100644 --- a/src/types/deletion/job.type.ts +++ b/src/types/deletion/job.type.ts @@ -1,4 +1,6 @@ import z from 'zod'; -import { deleteLayerJobParamsSchema } from '../../schemas/deletion/job.schema'; +import { cacheDeletionJobParamsSchema, deleteLayerJobParamsSchema } from '../../schemas/deletion/job.schema'; export type DeleteLayerJobParams = z.infer; + +export type CacheDeletionJobParams = z.infer;