@takashito/linode-mcp-server
Version:
MCP server for Linode API
76 lines • 3.6 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.uploadAttachmentSchema = exports.createReplySchema = exports.listRepliesSchema = exports.ReplySchema = exports.closeTicketSchema = exports.createTicketSchema = exports.getTicketSchema = exports.listTicketsSchema = exports.TicketSchema = exports.TicketSeverity = exports.TicketStatus = void 0;
const zod_1 = require("zod");
// Ticket schemas
exports.TicketStatus = zod_1.z.enum(['new', 'open', 'closed']);
exports.TicketSeverity = zod_1.z.enum(['low', 'medium', 'high']);
exports.TicketSchema = zod_1.z.object({
id: zod_1.z.number(),
summary: zod_1.z.string(),
description: zod_1.z.string(),
status: exports.TicketStatus,
severity: exports.TicketSeverity,
entity: zod_1.z.object({
id: zod_1.z.number().optional(),
type: zod_1.z.string().optional(),
label: zod_1.z.string().optional(),
url: zod_1.z.string().optional(),
}).optional(),
opened: zod_1.z.string(),
closed: zod_1.z.string().optional(),
updated: zod_1.z.string().optional(),
updated_by: zod_1.z.string().optional(),
gravatar_id: zod_1.z.string().optional(),
gravatar_url: zod_1.z.string().optional(),
});
// List tickets schema
exports.listTicketsSchema = zod_1.z.object({
page: zod_1.z.number().optional().describe('Page number of results to return.'),
page_size: zod_1.z.number().optional().describe('Number of results to return per page.'),
});
// Get ticket schema
exports.getTicketSchema = zod_1.z.object({
ticket_id: zod_1.z.number().describe('ID of the support ticket to retrieve'),
});
// Create ticket schema
exports.createTicketSchema = zod_1.z.object({
summary: zod_1.z.string().describe('The summary or title of the support ticket.'),
description: zod_1.z.string().describe('The full details of the support request.'),
domain_id: zod_1.z.number().optional().describe('The ID of a Domain to open a ticket about.'),
linode_id: zod_1.z.number().optional().describe('The ID of a Linode to open a ticket about.'),
nodebalancer_id: zod_1.z.number().optional().describe('The ID of a NodeBalancer to open a ticket about.'),
volume_id: zod_1.z.number().optional().describe('The ID of a Volume to open a ticket about.'),
});
// Close ticket schema
exports.closeTicketSchema = zod_1.z.object({
ticket_id: zod_1.z.number().describe('ID of the support ticket to close'),
});
// Reply schemas
exports.ReplySchema = zod_1.z.object({
id: zod_1.z.number(),
ticket_id: zod_1.z.number(),
description: zod_1.z.string(),
created: zod_1.z.string(),
created_by: zod_1.z.string(),
from_linode: zod_1.z.boolean(),
gravatar_id: zod_1.z.string().optional(),
gravatar_url: zod_1.z.string().optional(),
});
// List replies schema
exports.listRepliesSchema = zod_1.z.object({
ticket_id: zod_1.z.number().describe('ID of the support ticket'),
page: zod_1.z.number().optional().describe('Page number of results to return.'),
page_size: zod_1.z.number().optional().describe('Number of results to return per page.'),
});
// Create reply schema
exports.createReplySchema = zod_1.z.object({
ticket_id: zod_1.z.number().describe('ID of the support ticket to reply to'),
description: zod_1.z.string().describe('The reply text'),
});
// Upload attachment schema
exports.uploadAttachmentSchema = zod_1.z.object({
ticket_id: zod_1.z.number().describe('ID of the support ticket'),
file: zod_1.z.string().describe('The file to be uploaded as a base64 encoded string'),
});
//# sourceMappingURL=schemas.js.map