mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 01:36:30 +02:00
add update document request / response zod schema
This commit is contained in:
parent
0fa969925a
commit
dd652e36fc
1 changed files with 12 additions and 0 deletions
|
|
@ -142,6 +142,16 @@ export const getDocumentByChunkRequest = z.object({
|
|||
|
||||
export const getDocumentByChunkResponse = documentWithChunks;
|
||||
|
||||
/**
|
||||
* Update document
|
||||
*/
|
||||
export const updateDocumentRequest = z.object({
|
||||
id: z.number(),
|
||||
data: document.pick({ search_space_id: true, document_type: true, content: true }),
|
||||
});
|
||||
|
||||
export const updateDocumentResponse = document;
|
||||
|
||||
export type GetDocumentsRequest = z.infer<typeof getDocumentsRequest>;
|
||||
export type GetDocumentsResponse = z.infer<typeof getDocumentsResponse>;
|
||||
export type GetDocumentRequest = z.infer<typeof getDocumentRequest>;
|
||||
|
|
@ -156,3 +166,5 @@ export type GetDocumentTypeCountsRequest = z.infer<typeof getDocumentTypeCountsR
|
|||
export type GetDocumentTypeCountsResponse = z.infer<typeof getDocumentTypeCountsResponse>;
|
||||
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>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue