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