mirror of
https://github.com/documenso/documenso.git
synced 2025-11-11 04:52:41 +10:00
feat: update contract
This commit is contained in:
@ -19,13 +19,18 @@ const DocumentSchema = z.object({
|
|||||||
completedAt: z.date().nullable(),
|
completedAt: z.date().nullable(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const SuccessfulResponse = z.object({
|
||||||
|
documents: DocumentSchema.array(),
|
||||||
|
totalPages: z.number(),
|
||||||
|
});
|
||||||
|
|
||||||
export const contract = c.router({
|
export const contract = c.router({
|
||||||
getDocuments: {
|
getDocuments: {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path: '/documents',
|
path: '/documents',
|
||||||
query: GetDocumentsQuery,
|
query: GetDocumentsQuery,
|
||||||
responses: {
|
responses: {
|
||||||
200: DocumentSchema.array(),
|
200: SuccessfulResponse,
|
||||||
},
|
},
|
||||||
summary: 'Get all documents for a user',
|
summary: 'Get all documents for a user',
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user