mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
feat: get documents api route with pagination
This commit is contained in:
@ -4,19 +4,19 @@ import { z } from 'zod';
|
||||
const c = initContract();
|
||||
|
||||
const GetDocumentsQuery = z.object({
|
||||
take: z.string().default('10'),
|
||||
skip: z.string().default('0'),
|
||||
page: z.string().optional(),
|
||||
perPage: z.string().optional(),
|
||||
});
|
||||
|
||||
const DocumentSchema = z.object({
|
||||
id: z.string(),
|
||||
id: z.number(),
|
||||
userId: z.number(),
|
||||
title: z.string(),
|
||||
status: z.string(),
|
||||
documentDataId: z.string(),
|
||||
createdAt: z.string(),
|
||||
updatedAt: z.string(),
|
||||
completedAt: z.string(),
|
||||
createdAt: z.date(),
|
||||
updatedAt: z.date(),
|
||||
completedAt: z.date().nullable(),
|
||||
});
|
||||
|
||||
export const contract = c.router({
|
||||
|
||||
Reference in New Issue
Block a user