refactor(installation): move form schema and configuration to separate files fix(installation): update page title and content display
16 lines
396 B
TypeScript
16 lines
396 B
TypeScript
import * as z from 'zod'
|
|
|
|
export const querySchema = z.object({
|
|
q: z.union([z.literal(''), z.string().min(3)]).optional().catch(''),
|
|
page: z.coerce.number().int().min(1).default(1).catch(1),
|
|
pageSize: z.coerce.number().int().min(5).max(20).default(10).catch(10),
|
|
})
|
|
|
|
export const defaultQuery = {
|
|
q: '',
|
|
page: 1,
|
|
pageSize: 10,
|
|
}
|
|
|
|
export type QueryParams = z.infer<typeof querySchema>
|