import { PaginatedResponse } from "../types/api-response"; import { Classification } from "../types/classification"; import { apiHelpers } from "./api"; const classificationApi = { getClassifications: async (): Promise< PaginatedResponse > => { return apiHelpers.get("/classifications"); }, getClassificationById: async (id: number): Promise => { return apiHelpers.get(`/classifications/${id}`); }, deleteClassification: async ( id?: number ): Promise> => { return apiHelpers.delete(`/classifications/${id}`); }, createClassification: async ( classification: Omit ): Promise => { return apiHelpers.post("/classifications", classification); }, }; export default classificationApi;