add core api

This commit is contained in:
ItsMalma
2025-11-15 22:28:58 +07:00
parent e6386648be
commit 8f91994f29
78 changed files with 6701 additions and 904 deletions

29
src/common/types.ts Normal file
View File

@@ -0,0 +1,29 @@
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;
}[];
};