import { api } from '@/lib/api' import type { PaginatedResponse, SupplierResponse } from '@/types/api' import type { PageParams } from './master' export interface SupplierBody { name: string contactInfo?: string | null isActive?: boolean } export const suppliers = { list: (params?: PageParams) => api.get>('/suppliers', { params }).then(r => r.data), get: (id: string) => api.get(`/suppliers/${id}`).then(r => r.data), create: (body: SupplierBody) => api.post('/suppliers', body).then(r => r.data), update: (id: string, body: Partial) => api.put(`/suppliers/${id}`, body).then(r => r.data), }