Add pagination, complete organization routes

This commit is contained in:
2024-12-20 23:14:32 +05:30
parent a584fc91b5
commit cc2665544b
6 changed files with 190 additions and 6 deletions

14
src/pagination.ts Normal file
View File

@@ -0,0 +1,14 @@
import { z } from "zod";
export const pageMetadata = z.object({
count: z.number(),
page: z.number(),
pageSize: z.number(),
});
export const pageQueryParams = z.object({
page: z.number().optional(),
pageSize: z.number().optional(),
});
export type PageQueryParams = z.infer<typeof pageQueryParams>;