UNPKG

ixp-server

Version:

A comprehensive SDK for building Intent Exchange Protocol (IXP) servers with ease

83 lines 2.12 kB
import { Router } from 'express'; import type { IXPServerConfig, IXPServerInstance, IXPPlugin, IXPMiddleware } from '../types/index'; import { IntentRegistry } from './IntentRegistry'; import { ComponentRegistry } from './ComponentRegistry'; import { IntentResolver } from './IntentResolver'; /** * Main IXP Server class that orchestrates all components */ export declare class IXPServer implements IXPServerInstance { readonly app: Router; readonly config: IXPServerConfig; readonly intentRegistry: IntentRegistry; readonly componentRegistry: ComponentRegistry; readonly intentResolver: IntentResolver; private plugins; private middlewares; private metricsService; private logger; private server?; private isInitialized; constructor(config?: IXPServerConfig); /** * Initialize the server with middleware and routes */ initialize(): Promise<void>; /** * Setup core middleware (CORS, security, etc.) */ private setupCoreMiddleware; /** * Setup custom middleware */ private setupCustomMiddleware; /** * Install plugins */ private installPlugins; /** * Setup IXP routes */ private setupRoutes; /** * Setup error handling middleware */ private setupErrorHandling; /** * Add plugin to the server */ addPlugin(plugin: IXPPlugin): Promise<void>; /** * Remove plugin from the server */ removePlugin(name: string): Promise<void>; /** * Add middleware to the server */ addMiddleware(middleware: IXPMiddleware): void; /** * Start the server */ listen(port?: number): Promise<void>; /** * Stop the server */ close(): Promise<void>; /** * Get health check information */ private getHealthCheck; /** * Get metrics information */ private getMetrics; /** * Normalize configuration with defaults */ private normalizeConfig; /** * Cleanup resources */ destroy(): Promise<void>; } //# sourceMappingURL=IXPServer.d.ts.map