mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 09:16:22 +02:00
feat: add delete search space zod schemas
This commit is contained in:
parent
0f531ee723
commit
3ef860fb1c
1 changed files with 11 additions and 0 deletions
|
|
@ -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<typeof searchSpace>;
|
||||
export type GetSearchSpacesRequest = z.infer<typeof getSearchSpacesRequest>;
|
||||
|
|
@ -82,3 +91,5 @@ export type GetSearchSpaceRequest = z.infer<typeof getSearchSpaceRequest>;
|
|||
export type GetSearchSpaceResponse = z.infer<typeof getSearchSpaceResponse>;
|
||||
export type UpdateSearchSpaceRequest = z.infer<typeof updateSearchSpaceRequest>;
|
||||
export type UpdateSearchSpaceResponse = z.infer<typeof updateSearchSpaceResponse>;
|
||||
export type DeleteSearchSpaceRequest = z.infer<typeof deleteSearchSpaceRequest>;
|
||||
export type DeleteSearchSpaceResponse = z.infer<typeof deleteSearchSpaceResponse>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue