import { IGroup } from "@staticdeploy/core" ; import { AxiosInstance } from "axios" ; export default class GroupsClient { constructor ( private axios ) { } async getAll ( ) { const result = await this . axios . get ( "/groups" ) ; return result . data ; } async getOne ( id ) { const result = await this . axios . get ( `/groups/${ id }` ) ; return result . data ; } async create ( group ) { const result = await this . axios . post ( "/groups" , group ) ; return result . data ; } async update ( id , patch ) { const result = await this . axios . patch ( `/groups/${ id }` , patch ) ; return result . data ; } async delete ( id ) { await this . axios . delete ( `/groups/${ id }` ) ; } }