@takashito/linode-mcp-server
Version:
MCP server for Linode API
162 lines (161 loc) • 4.99 kB
TypeScript
import { AxiosInstance } from 'axios';
import { PaginatedResponse, PaginationParams } from './common';
/**
* Interface for a Log Stream
*/
export interface LogStream {
id: number;
label: string;
filters: Record<string, any>;
aggregation: Record<string, any>;
created: string;
updated: string;
}
/**
* Interface for creating a Log Stream
*/
export interface CreateLogStreamRequest {
label: string;
filters: Record<string, any>;
aggregation: Record<string, any>;
}
/**
* Interface for updating a Log Stream
*/
export interface UpdateLogStreamRequest {
label?: string;
filters?: Record<string, any>;
aggregation?: Record<string, any>;
}
/**
* Interface for a Log Stream History entry
*/
export interface LogStreamHistory {
id: number;
stream_id: number;
timestamp: string;
data: Record<string, any>;
}
/**
* Interface for a Log Destination
*/
export interface LogDestination {
id: number;
label: string;
type: string;
config: Record<string, any>;
created: string;
updated: string;
}
/**
* Interface for creating a Log Destination
*/
export interface CreateLogDestinationRequest {
label: string;
type: string;
config: Record<string, any>;
}
/**
* Interface for updating a Log Destination
*/
export interface UpdateLogDestinationRequest {
label?: string;
type?: string;
config?: Record<string, any>;
}
/**
* Interface for a Log Destination History entry
*/
export interface LogDestinationHistory {
id: number;
destination_id: number;
timestamp: string;
data: Record<string, any>;
}
/**
* Client for Linode Monitor Logs API
*/
export interface MonitorLogsClient {
/**
* Get a list of log streams
* @param params - Pagination parameters
* @returns A paginated list of log streams
*/
getLogStreams(params?: PaginationParams): Promise<PaginatedResponse<LogStream>>;
/**
* Get a specific log stream
* @param streamId - The ID of the log stream
* @returns The log stream object
*/
getLogStream(streamId: number): Promise<LogStream>;
/**
* Create a new log stream
* @param data - The data for the new log stream
* @returns The newly created log stream
*/
createLogStream(data: CreateLogStreamRequest): Promise<LogStream>;
/**
* Update an existing log stream
* @param streamId - The ID of the log stream to update
* @param data - The data to update
* @returns The updated log stream
*/
updateLogStream(streamId: number, data: UpdateLogStreamRequest): Promise<LogStream>;
/**
* Delete a log stream
* @param streamId - The ID of the log stream to delete
* @returns Empty response on success
*/
deleteLogStream(streamId: number): Promise<{}>;
/**
* Get a log stream's history
* @param streamId - The ID of the log stream
* @param params - Pagination parameters
* @returns A paginated list of log stream history entries
*/
getLogStreamHistory(streamId: number, params?: PaginationParams): Promise<PaginatedResponse<LogStreamHistory>>;
/**
* Get a list of log destinations
* @param params - Pagination parameters
* @returns A paginated list of log destinations
*/
getLogDestinations(params?: PaginationParams): Promise<PaginatedResponse<LogDestination>>;
/**
* Get a specific log destination
* @param destinationId - The ID of the log destination
* @returns The log destination object
*/
getLogDestination(destinationId: number): Promise<LogDestination>;
/**
* Create a new log destination
* @param data - The data for the new log destination
* @returns The newly created log destination
*/
createLogDestination(data: CreateLogDestinationRequest): Promise<LogDestination>;
/**
* Update an existing log destination
* @param destinationId - The ID of the log destination to update
* @param data - The data to update
* @returns The updated log destination
*/
updateLogDestination(destinationId: number, data: UpdateLogDestinationRequest): Promise<LogDestination>;
/**
* Delete a log destination
* @param destinationId - The ID of the log destination to delete
* @returns Empty response on success
*/
deleteLogDestination(destinationId: number): Promise<{}>;
/**
* Get a log destination's history
* @param destinationId - The ID of the log destination
* @param params - Pagination parameters
* @returns A paginated list of log destination history entries
*/
getLogDestinationHistory(destinationId: number, params?: PaginationParams): Promise<PaginatedResponse<LogDestinationHistory>>;
}
/**
* Create a new Monitor Logs client
* @param axios - The Axios instance for API calls
* @returns A new Monitor Logs client
*/
export declare function createMonitorLogsClient(axios: AxiosInstance): MonitorLogsClient;