From 3ef860fb1c3b117e8d6939aabf558fcb52d8dd67 Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Thu, 11 Dec 2025 20:02:08 +0000 Subject: [PATCH] feat: add delete search space zod schemas --- surfsense_web/contracts/types/search-space.types.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/surfsense_web/contracts/types/search-space.types.ts b/surfsense_web/contracts/types/search-space.types.ts index e8af831bd..7c324b55a 100644 --- a/surfsense_web/contracts/types/search-space.types.ts +++ b/surfsense_web/contracts/types/search-space.types.ts @@ -71,6 +71,15 @@ export const updateSearchSpaceRequest = z.object({ export const updateSearchSpaceResponse = searchSpace.omit({ member_count: true, is_owner: true }); +/** + * Delete search space + */ +export const deleteSearchSpaceRequest = searchSpace.pick({ id: true }); + +export const deleteSearchSpaceResponse = z.object({ + message: z.literal("Search space deleted successfully"), +}); + // Inferred types export type SearchSpace = z.infer; export type GetSearchSpacesRequest = z.infer; @@ -82,3 +91,5 @@ export type GetSearchSpaceRequest = z.infer; export type GetSearchSpaceResponse = z.infer; export type UpdateSearchSpaceRequest = z.infer; export type UpdateSearchSpaceResponse = z.infer; +export type DeleteSearchSpaceRequest = z.infer; +export type DeleteSearchSpaceResponse = z.infer;