mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-25 12:18:44 +00:00
17 lines
450 B
TypeScript
17 lines
450 B
TypeScript
import { z } from 'zod'
|
|
|
|
export const paginationPageInfoSchema = z.object({
|
|
cursor: z.string().optional(),
|
|
total: z.number().optional(),
|
|
totalSize: z.number().optional(),
|
|
})
|
|
|
|
export type PaginationPageInfo = z.infer<typeof paginationPageInfoSchema>
|
|
|
|
export const paginationParamsSchema = z.object({
|
|
first: z.coerce.number().optional(),
|
|
after: z.string().optional(),
|
|
})
|
|
|
|
export type PaginationParams = z.infer<typeof paginationParamsSchema>
|