import { AxiosInstance } from 'axios' ; import { FieldData , FieldUpdate } from '../@types' ; export default function ( client ) { return { async getFields ( ) { return await client . get ( 'fields' ) ; } , async createField ( field ) { return await client . post ( 'fields' , field ) ; } , async updateField ( fieldId , fieldUpdate ) { return await client . put ( `fields/${ fieldId }` , fieldUpdate ) ; } , async removeField ( fieldId ) { return await client . delete ( `fields/${ fieldId }` ) ; } , } ; }