import apiClient from './index.js' import { apiEndpoints as E } from './endpoints.js' import { paginatedGet } from './paginate.js' import { apiCall } from './apiError.js' // Get term list export const getTerms = () => paginatedGet(apiClient, E.TERMS.LIST) // Create term export const createTerm = (data) => apiCall('POST', E.TERMS.CREATE, { data }, 'Failed to create term') // Update term export const updateTerm = (termId, data) => apiCall('PATCH', E.TERMS.UPDATE(termId), { data }, 'Failed to update term') // Delete term export const deleteTerm = (termId) => apiCall('DELETE', E.TERMS.DELETE(termId), null, 'Failed to delete term')