Files
goumrah-api/src/common/types.ts
2025-11-15 22:28:58 +07:00

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;
}[];
};