import * as jsonapi from 'utils/json-api-client' import { boundMethod } from 'autobind-decorator' /** * Destroy deletes a JobSpecError, effectively dismissing the notification * * @example "/job_spec_errors/:SpecID" */ interface DestroyPathParams { id: string } const DESTROY_ENDPOINT = '/proxy/v2/job_spec_errors/:id' export class JobSpecErrors { constructor(private api: jsonapi.Api) {} @boundMethod public destroyJobSpecError(id: string): Promise> { return this.destroy(undefined, { id }) } private destroy = this.api.deleteResource( DESTROY_ENDPOINT, ) }