mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-30 04:44:28 +00:00
16 lines
414 B
TypeScript
16 lines
414 B
TypeScript
import { z } from 'zod'
|
|
|
|
export const paginationPageInfoSchema = z.object({
|
|
cursor: z.string().optional(),
|
|
total: 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>
|