mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 17:56:25 +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;
|
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 GetDocumentsRequest = z.infer<typeof getDocumentsRequest>;
|
||||||
export type GetDocumentsResponse = z.infer<typeof getDocumentsResponse>;
|
export type GetDocumentsResponse = z.infer<typeof getDocumentsResponse>;
|
||||||
export type GetDocumentRequest = z.infer<typeof getDocumentRequest>;
|
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 GetDocumentTypeCountsResponse = z.infer<typeof getDocumentTypeCountsResponse>;
|
||||||
export type GetDocumentByChunkRequest = z.infer<typeof getDocumentByChunkRequest>;
|
export type GetDocumentByChunkRequest = z.infer<typeof getDocumentByChunkRequest>;
|
||||||
export type GetDocumentByChunkResponse = z.infer<typeof getDocumentByChunkResponse>;
|
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