@takashito/linode-mcp-server
Version:
MCP server for Linode API
142 lines • 10.2 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resumePostgreSQLInstanceSchema = exports.suspendPostgreSQLInstanceSchema = exports.patchPostgreSQLInstanceSchema = exports.getPostgreSQLSSLCertificateSchema = exports.resetPostgreSQLCredentialsSchema = exports.getPostgreSQLCredentialsSchema = exports.deletePostgreSQLInstanceSchema = exports.updatePostgreSQLInstanceSchema = exports.createPostgreSQLInstanceSchema = exports.getPostgreSQLInstanceSchema = exports.listPostgreSQLInstancesSchema = exports.resumeMySQLInstanceSchema = exports.suspendMySQLInstanceSchema = exports.patchMySQLInstanceSchema = exports.getMySQLSSLCertificateSchema = exports.resetMySQLCredentialsSchema = exports.getMySQLCredentialsSchema = exports.deleteMySQLInstanceSchema = exports.updateMySQLInstanceSchema = exports.createMySQLInstanceSchema = exports.getMySQLInstanceSchema = exports.listMySQLInstancesSchema = exports.listDatabaseInstancesSchema = exports.getTypeSchema = exports.listTypesSchema = exports.getEngineSchema = exports.listEnginesSchema = void 0;
const zod_1 = require("zod");
const schemas_1 = require("../common/schemas");
// Database engine schemas
exports.listEnginesSchema = zod_1.z.object({
...schemas_1.pagingParamsSchema.shape
});
exports.getEngineSchema = zod_1.z.object({
engineId: zod_1.z.string().describe('The ID of the database engine')
});
// Database type schemas
exports.listTypesSchema = zod_1.z.object({
...schemas_1.pagingParamsSchema.shape
});
exports.getTypeSchema = zod_1.z.object({
typeId: zod_1.z.string().describe('The ID of the database type')
});
// General database instances schema
exports.listDatabaseInstancesSchema = zod_1.z.object({
...schemas_1.pagingParamsSchema.shape
});
// MySQL database schemas
exports.listMySQLInstancesSchema = zod_1.z.object({
...schemas_1.pagingParamsSchema.shape
});
exports.getMySQLInstanceSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the MySQL database instance')
});
exports.createMySQLInstanceSchema = zod_1.z.object({
label: zod_1.z.string().describe('A label for easy identification of the MySQL database instance'),
region: zod_1.z.string().describe('The region where the MySQL database will be deployed'),
type: zod_1.z.string().describe('The Linode database instance type that determines RAM, CPU, and storage allocations'),
engine: zod_1.z.string().describe('The MySQL engine type and version to use'),
allow_list: zod_1.z.array(zod_1.z.string()).optional().describe('A list of IP addresses that can access the database instance (CIDR notation)'),
cluster_size: zod_1.z.number().optional().describe('The number of nodes in the MySQL database cluster (1-3)'),
encrypted: zod_1.z.boolean().optional().describe('Whether the MySQL database disks are encrypted'),
ssl_connection: zod_1.z.boolean().optional().describe('Whether SSL/TLS connections to the MySQL database are enforced'),
tags: schemas_1.tagsSchema,
updates: zod_1.z.object({
day_of_week: zod_1.z.number().describe('The day of the week when updates should be applied (0-6, where 0 is Sunday)'),
duration: zod_1.z.number().describe('The maximum maintenance window in hours'),
frequency: zod_1.z.enum(['weekly', 'monthly']).describe('How frequently the maintenance is performed'),
hour_of_day: zod_1.z.number().describe('The hour of the day when the maintenance window starts (0-23)'),
week_of_month: zod_1.z.number().optional().describe('The week of the month when updates should be applied (1-4, required for monthly frequency)')
}).optional().describe('MySQL database maintenance and update configuration')
});
exports.updateMySQLInstanceSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the MySQL database instance'),
label: zod_1.z.string().optional().describe('A label for easy identification of the MySQL database instance'),
allow_list: zod_1.z.array(zod_1.z.string()).optional().describe('A list of IP addresses that can access the database instance (CIDR notation)'),
tags: schemas_1.tagsSchema,
updates: zod_1.z.object({
day_of_week: zod_1.z.number().optional().describe('The day of the week when updates should be applied (0-6, where 0 is Sunday)'),
duration: zod_1.z.number().optional().describe('The maximum maintenance window in hours'),
frequency: zod_1.z.enum(['weekly', 'monthly']).optional().describe('How frequently the maintenance is performed'),
hour_of_day: zod_1.z.number().optional().describe('The hour of the day when the maintenance window starts (0-23)'),
week_of_month: zod_1.z.number().optional().describe('The week of the month when updates should be applied (1-4, required for monthly frequency)')
}).optional().describe('MySQL database maintenance and update configuration')
});
exports.deleteMySQLInstanceSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the MySQL database instance')
});
exports.getMySQLCredentialsSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the MySQL database instance')
});
exports.resetMySQLCredentialsSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the MySQL database instance')
});
exports.getMySQLSSLCertificateSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the MySQL database instance')
});
exports.patchMySQLInstanceSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the MySQL database instance')
});
exports.suspendMySQLInstanceSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the MySQL database instance')
});
exports.resumeMySQLInstanceSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the MySQL database instance')
});
// PostgreSQL database schemas
exports.listPostgreSQLInstancesSchema = zod_1.z.object({
...schemas_1.pagingParamsSchema.shape
});
exports.getPostgreSQLInstanceSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the PostgreSQL database instance')
});
exports.createPostgreSQLInstanceSchema = zod_1.z.object({
label: zod_1.z.string().describe('A label for easy identification of the PostgreSQL database instance'),
region: zod_1.z.string().describe('The region where the PostgreSQL database will be deployed'),
type: zod_1.z.string().describe('The Linode database instance type that determines RAM, CPU, and storage allocations'),
engine: zod_1.z.string().describe('The PostgreSQL engine type and version to use'),
allow_list: zod_1.z.array(zod_1.z.string()).optional().describe('A list of IP addresses that can access the database instance (CIDR notation)'),
cluster_size: zod_1.z.number().optional().describe('The number of nodes in the PostgreSQL database cluster (1-3)'),
encrypted: zod_1.z.boolean().optional().describe('Whether the PostgreSQL database disks are encrypted'),
ssl_connection: zod_1.z.boolean().optional().describe('Whether SSL/TLS connections to the PostgreSQL database are enforced'),
tags: schemas_1.tagsSchema,
updates: zod_1.z.object({
day_of_week: zod_1.z.number().describe('The day of the week when updates should be applied (0-6, where 0 is Sunday)'),
duration: zod_1.z.number().describe('The maximum maintenance window in hours'),
frequency: zod_1.z.enum(['weekly', 'monthly']).describe('How frequently the maintenance is performed'),
hour_of_day: zod_1.z.number().describe('The hour of the day when the maintenance window starts (0-23)'),
week_of_month: zod_1.z.number().optional().describe('The week of the month when updates should be applied (1-4, required for monthly frequency)')
}).optional().describe('PostgreSQL database maintenance and update configuration')
});
exports.updatePostgreSQLInstanceSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the PostgreSQL database instance'),
label: zod_1.z.string().optional().describe('A label for easy identification of the PostgreSQL database instance'),
allow_list: zod_1.z.array(zod_1.z.string()).optional().describe('A list of IP addresses that can access the database instance (CIDR notation)'),
tags: schemas_1.tagsSchema,
updates: zod_1.z.object({
day_of_week: zod_1.z.number().optional().describe('The day of the week when updates should be applied (0-6, where 0 is Sunday)'),
duration: zod_1.z.number().optional().describe('The maximum maintenance window in hours'),
frequency: zod_1.z.enum(['weekly', 'monthly']).optional().describe('How frequently the maintenance is performed'),
hour_of_day: zod_1.z.number().optional().describe('The hour of the day when the maintenance window starts (0-23)'),
week_of_month: zod_1.z.number().optional().describe('The week of the month when updates should be applied (1-4, required for monthly frequency)')
}).optional().describe('PostgreSQL database maintenance and update configuration')
});
exports.deletePostgreSQLInstanceSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the PostgreSQL database instance')
});
exports.getPostgreSQLCredentialsSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the PostgreSQL database instance')
});
exports.resetPostgreSQLCredentialsSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the PostgreSQL database instance')
});
exports.getPostgreSQLSSLCertificateSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the PostgreSQL database instance')
});
exports.patchPostgreSQLInstanceSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the PostgreSQL database instance')
});
exports.suspendPostgreSQLInstanceSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the PostgreSQL database instance')
});
exports.resumePostgreSQLInstanceSchema = zod_1.z.object({
instanceId: zod_1.z.number().describe('The ID of the PostgreSQL database instance')
});
//# sourceMappingURL=schemas.js.map