import client from '../client' ; import { AxiosRequestConfig } from 'axios' ; export interface UpdateArgs { id : string ; group : Record < string , any > ; } export async function groupUpdate ( opts , context ) { const { id , group } = opts || { } ; if ( ! id ) throw new Error ( 'You should provide `id`' ) ; const res = await client . put ( `/groups/${ id }` , group , context ) ; return res ?. data ?. data [ 0 ] ; }