import { IEntrypoint } from "@staticdeploy/core" ; import { AxiosInstance } from "axios" ; export default class EntrypointsClient { constructor ( private axios ) { } async getAll ( filter ) { const result = await this . axios . get ( "/entrypoints" , { params : filter } ) ; return result . data ; } async getOne ( id ) { const result = await this . axios . get ( `/entrypoints/${ id }` ) ; return result . data ; } async create ( entrypoint ) { const result = await this . axios . post ( "/entrypoints" , entrypoint ) ; return result . data ; } async update ( id , patch ) { const result = await this . axios . patch ( `/entrypoints/${ id }` , patch ) ; return result . data ; } async delete ( id ) { await this . axios . delete ( `/entrypoints/${ id }` ) ; } }