import axios from "axios" ; import { API } from "." ; import { IIncident } from "../interfaces/IIncident" ; import { IResponse } from "../interfaces/IResponse" ; class IncidentService { private _api = '' ; constructor ( SLOId ) { this . _api = `${ API }/api/v1/incident/${ SLOId }` ; } get = ( ) => axios . get < IResponse < IIncident [ ] > > ( this . _api ) ; create = ( data ) => axios . post < IResponse < IIncident > > ( this . _api , data ) ; update = ( incidentID , data ) => axios . patch ( `${ this . _api }/${ incidentID }` , data ) ; } export default IncidentService ;