tuxcare-eportal-mcp
Version:
TuxCare ePortal MCP server for integrating with TuxCare ePortal API
139 lines • 3.52 kB
TypeScript
import { AuthConfig } from './auth.js';
export interface Server {
id: string;
ip: string;
hostname: string;
key: string;
feed: string;
registered: string;
checkin: string;
updated: string;
euname: string;
release: string;
kernel_id: string;
patch_level: number;
patch_type: string;
tags: string | null;
uptime: number;
version: string;
virt: string;
kcare_version: string;
distro: string;
distro_version: string;
machine: string;
processor: string;
}
export interface ServerListResponse {
count: number;
limit: number;
offset: number;
result: Server[];
}
export interface RegisterResponse {
server_id: string;
}
export interface ErrorResponse {
error: string;
}
export interface DeleteResponse {
result: number;
}
export interface Feed {
name: string;
auto: boolean;
deploy_after: number;
}
export interface FeedListResponse {
result: Feed[];
}
export interface Key {
key: string;
feed: string;
note: string | null;
server_limit: number;
}
export interface KeyListResponse {
result: Key[];
}
export interface Patchset {
patchset: string;
status: 'enabled' | 'disabled' | 'not-downloaded' | 'undeployed';
}
export interface PatchsetListResponse {
result: Patchset[];
}
export interface User {
id: number;
username: string;
description: string;
readonly: boolean;
}
export interface UserListResponse {
result: User[];
}
export interface ServerListFilters {
hostname?: string;
ip?: string;
service_id?: string;
feed?: string;
key?: string;
registered_age?: number;
checkin_age?: number;
updated_age?: number;
is_updated?: boolean;
limit?: number;
offset?: number;
only_count?: boolean;
tag?: string;
}
export interface PatchsetFilters {
feed?: string;
product?: 'kernel' | 'user' | 'qemu' | 'db';
}
export interface PatchsetManageOptions {
patchset: string;
feed: string[];
action: 'enable' | 'disable' | 'enable-upto' | 'undeploy-downto';
product?: 'kernel' | 'user' | 'qemu' | 'db';
}
export declare class EPortalClient {
private client;
private authManager;
constructor(baseURL: string, authConfig: AuthConfig);
listServers(filters?: ServerListFilters): Promise<ServerListResponse>;
registerHost(key: string, hostname?: string): Promise<RegisterResponse>;
unregisterHost(options: {
hostname?: string;
ip?: string;
server_id?: string;
}): Promise<DeleteResponse>;
bulkUnregisterHosts(checkin_age: number): Promise<DeleteResponse>;
listFeeds(): Promise<FeedListResponse>;
createOrModifyFeed(feed: {
name: string;
auto?: boolean;
deploy_after?: number;
}): Promise<{
result: Feed;
}>;
deleteFeed(name: string): Promise<DeleteResponse>;
listKeys(): Promise<KeyListResponse>;
createOrModifyKey(keyData: {
key?: string;
feed?: string;
note?: string;
server_limit?: number;
}): Promise<{
result: Key;
}>;
deleteKey(key: string): Promise<DeleteResponse>;
listPatchsets(filters?: PatchsetFilters): Promise<PatchsetListResponse>;
managePatchsets(options: PatchsetManageOptions): Promise<{
result: string;
}>;
listUsers(): Promise<UserListResponse>;
setTags(server_id: string, tags?: string): Promise<{
result: string;
}>;
}
//# sourceMappingURL=api-client.d.ts.map