import api from './api';

const base = '/external-alerts';

const externalAlertService = {
    getAll:         (params) => api.get(base, { params }).then(r => r.data.data),
    acknowledge:    (id)     => api.post(`${base}/${id}/acknowledge`).then(r => r.data.data),
    createTicket:   (id)     => api.post(`${base}/${id}/create-ticket`).then(r => r.data.data),
    remove:         (id)     => api.delete(`${base}/${id}`).then(r => r.data),
};

export default externalAlertService;
