30 lines
501 B
TypeScript
30 lines
501 B
TypeScript
import type { paginationQuerySchema } from "@/common/schemas";
|
|
import type z from "zod";
|
|
|
|
export type PaginationQuery = z.infer<typeof paginationQuerySchema>;
|
|
|
|
export type SingleResponse<T> = {
|
|
data: T;
|
|
errors: null;
|
|
};
|
|
|
|
export type ListResponse<T> = {
|
|
data: T[];
|
|
errors: null;
|
|
meta: {
|
|
page: number;
|
|
per_page: number;
|
|
total_pages: number;
|
|
total_items: number;
|
|
};
|
|
};
|
|
|
|
export type ErrorResponse = {
|
|
data: null;
|
|
errors: {
|
|
path?: string;
|
|
location?: string;
|
|
message: string;
|
|
}[];
|
|
};
|