firewalla-mcp-server
Version:
Model Context Protocol (MCP) server for Firewalla MSP API - Provides real-time network monitoring, security analysis, and firewall management through 28 specialized tools compatible with any MCP client
51 lines • 1.51 kB
TypeScript
/**
* Simple utility functions replacing over-engineered Manager classes
*/
/**
* Simple pagination - just limit results and track if there are more
*/
export declare function paginateResults<T>(results: T[], limit: number, cursor?: string): {
data: T[];
hasMore: boolean;
nextCursor?: string;
count: number;
};
/**
* Simple timeout wrapper for promises
*/
export declare function withTimeout<T>(promise: Promise<T>, timeoutMs?: number): Promise<T>;
/**
* Simple retry mechanism
*/
export declare function withRetry<T>(operation: () => Promise<T>, maxRetries?: number, delayMs?: number): Promise<T>;
/**
* Simple streaming helper - process items in chunks
*/
export declare function processInChunks<T, R>(items: T[], processor: (chunk: T[]) => Promise<R[]>, chunkSize?: number): Promise<R[]>;
/**
* Simple bulk operation helper
*/
export declare function executeBulkOperation<T, R>(items: T[], operation: (item: T) => Promise<R>, batchSize?: number): Promise<{
successes: R[];
failures: Array<{
item: T;
error: Error;
}>;
}>;
/**
* Simple response formatting
*/
export declare function formatResponse<T>(data: T, meta?: Record<string, any>): {
data: T;
meta?: Record<string, any>;
};
/**
* Simple error formatting
*/
export declare function formatError(message: string, tool?: string, details?: string[]): {
error: boolean;
message: string;
tool?: string;
validation_errors?: string[];
};
//# sourceMappingURL=simple-utils.d.ts.map