https://dev.kronoz.win/r/marzneshin.git
1import { z } from "zod";
2
3const UseEntityQueryPropsSchema = z.object({
4 page: z.number().gte(1),
5 size: z.number().gte(1).lte(100)
6})
7
8export type UseEntityQueryProps = z.infer<typeof UseEntityQueryPropsSchema>
9
10export type EntityQueryKeyType = { queryKey: [string, number, number] }
11
12interface FetchEntityResult<T> {
13 pageCount: number
14 entity: T[]
15}
16
17export type FetchEntityReturn<T> = Promise<FetchEntityResult<T>>