UNPKG

@takashito/linode-mcp-server

Version:

MCP server for Linode API

61 lines 3.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createMonitorAlertsClient = createMonitorAlertsClient; /** * Create a new Monitor Alerts client * @param axios - The Axios instance for API calls * @returns A new Monitor Alerts client */ function createMonitorAlertsClient(axios) { return { async getNotificationChannels(params) { const response = await axios.get('/monitor/alert-channels', { params }); return response.data; }, async getNotificationChannel(channelId) { const response = await axios.get(`/monitor/alert-channels/${encodeURIComponent(channelId)}`); return response.data; }, async createNotificationChannel(data) { const response = await axios.post('/monitor/alert-channels', data); return response.data; }, async updateNotificationChannel(channelId, data) { const response = await axios.put(`/monitor/alert-channels/${encodeURIComponent(channelId)}`, data); return response.data; }, async deleteNotificationChannel(channelId) { const response = await axios.delete(`/monitor/alert-channels/${encodeURIComponent(channelId)}`); return response.data; }, async getChannelAlerts(channelId, params) { const response = await axios.get(`/monitor/alert-channels/${encodeURIComponent(channelId)}/alerts`, { params }); return response.data; }, async getAlertDefinitions(params) { const response = await axios.get('/monitor/alert-definitions', { params }); return response.data; }, async getServiceAlertDefinitions(serviceType, params) { const response = await axios.get(`/monitor/services/${encodeURIComponent(serviceType)}/alert-definitions`, { params }); return response.data; }, async getAlertDefinition(serviceType, alertId) { const response = await axios.get(`/monitor/services/${encodeURIComponent(serviceType)}/alert-definitions/${encodeURIComponent(alertId)}`); return response.data; }, async createAlertDefinition(serviceType, data) { const response = await axios.post(`/monitor/services/${encodeURIComponent(serviceType)}/alert-definitions`, data); return response.data; }, async updateAlertDefinition(serviceType, alertId, data) { const response = await axios.put(`/monitor/services/${encodeURIComponent(serviceType)}/alert-definitions/${encodeURIComponent(alertId)}`, data); return response.data; }, async deleteAlertDefinition(serviceType, alertId) { const response = await axios.delete(`/monitor/services/${encodeURIComponent(serviceType)}/alert-definitions/${encodeURIComponent(alertId)}`); return response.data; } }; } //# sourceMappingURL=monitorAlerts.js.map