mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-08 20:25:19 +02:00
add delete document request / response zod schema
This commit is contained in:
parent
dd652e36fc
commit
6378d27bcb
1 changed files with 11 additions and 0 deletions
|
|
@ -152,6 +152,15 @@ export const updateDocumentRequest = z.object({
|
|||
|
||||
export const updateDocumentResponse = document;
|
||||
|
||||
/**
|
||||
* Delete document
|
||||
*/
|
||||
export const deleteDocumentRequest = document.pick({ id: true });
|
||||
|
||||
export const deleteDocumentResponse = z.object({
|
||||
message: z.literal("Document deleted successfully"),
|
||||
});
|
||||
|
||||
export type GetDocumentsRequest = z.infer<typeof getDocumentsRequest>;
|
||||
export type GetDocumentsResponse = z.infer<typeof getDocumentsResponse>;
|
||||
export type GetDocumentRequest = z.infer<typeof getDocumentRequest>;
|
||||
|
|
@ -168,3 +177,5 @@ export type GetDocumentByChunkRequest = z.infer<typeof getDocumentByChunkRequest
|
|||
export type GetDocumentByChunkResponse = z.infer<typeof getDocumentByChunkResponse>;
|
||||
export type UpdateDocumentRequest = z.infer<typeof updateDocumentRequest>;
|
||||
export type UpdateDocumentResponse = z.infer<typeof updateDocumentResponse>;
|
||||
export type DeleteDocumentRequest = z.infer<typeof deleteDocumentRequest>;
|
||||
export type DeleteDocumentResponse = z.infer<typeof deleteDocumentResponse>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue