@takashito/linode-mcp-server
Version:
MCP server for Linode API
102 lines • 5.22 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deleteAlertDefinitionSchema = exports.updateAlertDefinitionSchema = exports.createAlertDefinitionSchema = exports.getAlertDefinitionSchema = exports.listServiceAlertDefinitionsSchema = exports.listAlertDefinitionsSchema = exports.listChannelAlertsSchema = exports.deleteNotificationChannelSchema = exports.updateNotificationChannelSchema = exports.createNotificationChannelSchema = exports.getNotificationChannelSchema = exports.listNotificationChannelsSchema = void 0;
const zod_1 = require("zod");
const schemas_1 = require("../common/schemas");
/**
* Schema for listing notification channels
*/
exports.listNotificationChannelsSchema = zod_1.z.object({
...schemas_1.pagingParamsSchema.shape
});
/**
* Schema for getting a specific notification channel
*/
exports.getNotificationChannelSchema = zod_1.z.object({
channelId: zod_1.z.number().describe('The ID of the notification channel')
});
/**
* Schema for creating a notification channel
*/
exports.createNotificationChannelSchema = zod_1.z.object({
label: zod_1.z.string().describe('The label for the notification channel'),
type: zod_1.z.string().describe('The type of notification channel (e.g., email, slack, webhook)'),
channel_data: zod_1.z.record(zod_1.z.any()).describe('The channel-specific configuration data')
});
/**
* Schema for updating a notification channel
*/
exports.updateNotificationChannelSchema = zod_1.z.object({
channelId: zod_1.z.number().describe('The ID of the notification channel'),
label: zod_1.z.string().optional().describe('The label for the notification channel'),
type: zod_1.z.string().optional().describe('The type of notification channel'),
channel_data: zod_1.z.record(zod_1.z.any()).optional().describe('The channel-specific configuration data')
});
/**
* Schema for deleting a notification channel
*/
exports.deleteNotificationChannelSchema = zod_1.z.object({
channelId: zod_1.z.number().describe('The ID of the notification channel')
});
/**
* Schema for listing alerts for a notification channel
*/
exports.listChannelAlertsSchema = zod_1.z.object({
channelId: zod_1.z.number().describe('The ID of the notification channel'),
...schemas_1.pagingParamsSchema.shape
});
/**
* Schema for listing all alert definitions
*/
exports.listAlertDefinitionsSchema = zod_1.z.object({
...schemas_1.pagingParamsSchema.shape
});
/**
* Schema for listing alert definitions for a service type
*/
exports.listServiceAlertDefinitionsSchema = zod_1.z.object({
serviceType: zod_1.z.string().describe('The service type (e.g., linode, dbaas, lke)'),
...schemas_1.pagingParamsSchema.shape
});
/**
* Schema for getting a specific alert definition
*/
exports.getAlertDefinitionSchema = zod_1.z.object({
serviceType: zod_1.z.string().describe('The service type (e.g., linode, dbaas, lke)'),
alertId: zod_1.z.number().describe('The ID of the alert definition')
});
/**
* Schema for creating an alert definition
*/
exports.createAlertDefinitionSchema = zod_1.z.object({
serviceType: zod_1.z.string().describe('The service type (e.g., linode, dbaas, lke)'),
label: zod_1.z.string().describe('The label for the alert definition'),
description: zod_1.z.string().optional().describe('A description of the alert definition'),
severity: zod_1.z.number().optional().describe('The severity level of the alert (0-3)'),
trigger_conditions: zod_1.z.record(zod_1.z.any()).describe('The conditions that trigger the alert'),
channel_ids: zod_1.z.array(zod_1.z.number()).optional().describe('Array of notification channel IDs to associate with this alert'),
entity_ids: zod_1.z.array(zod_1.z.string()).optional().describe('Array of entity IDs to monitor'),
enabled: zod_1.z.boolean().optional().describe('Whether the alert definition is enabled')
});
/**
* Schema for updating an alert definition
*/
exports.updateAlertDefinitionSchema = zod_1.z.object({
serviceType: zod_1.z.string().describe('The service type (e.g., linode, dbaas, lke)'),
alertId: zod_1.z.number().describe('The ID of the alert definition'),
label: zod_1.z.string().optional().describe('The label for the alert definition'),
description: zod_1.z.string().optional().describe('A description of the alert definition'),
severity: zod_1.z.number().optional().describe('The severity level of the alert (0-3)'),
trigger_conditions: zod_1.z.record(zod_1.z.any()).optional().describe('The conditions that trigger the alert'),
channel_ids: zod_1.z.array(zod_1.z.number()).optional().describe('Array of notification channel IDs to associate with this alert'),
entity_ids: zod_1.z.array(zod_1.z.string()).optional().describe('Array of entity IDs to monitor'),
enabled: zod_1.z.boolean().optional().describe('Whether the alert definition is enabled')
});
/**
* Schema for deleting an alert definition
*/
exports.deleteAlertDefinitionSchema = zod_1.z.object({
serviceType: zod_1.z.string().describe('The service type (e.g., linode, dbaas, lke)'),
alertId: zod_1.z.number().describe('The ID of the alert definition')
});
//# sourceMappingURL=schemas.js.map