@hivetechs/hive-ai
Version:
Real-time streaming AI consensus platform with HTTP+SSE MCP integration for Claude Code, VS Code, Cursor, and Windsurf - powered by OpenRouter's unified API
36 lines (35 loc) • 1.18 kB
TypeScript
/**
* Configurable API Endpoints
*
* Security: Removes hardcoded domains to prevent infrastructure targeting
* Allows runtime configuration of API endpoints for different environments
*/
export interface EndpointConfig {
apiEndpoint: string;
subscriptionEndpoint: string;
usageEndpoint: string;
checkoutEndpoint: string;
allowedDomains: string[];
}
declare const DEFAULT_ENDPOINTS: EndpointConfig;
/**
* Get current endpoint configuration
*/
export declare function getEndpointConfig(): EndpointConfig;
/**
* Update endpoint configuration (for testing/staging environments)
*/
export declare function updateEndpointConfig(config: Partial<EndpointConfig>): void;
/**
* Validate if a domain is allowed for API requests
*/
export declare function isAllowedDomain(domain: string): boolean;
/**
* Get API endpoint for specific service
*/
export declare function getApiEndpoint(service?: 'subscription' | 'usage' | 'checkout' | 'general'): string;
/**
* Build full API URL for a specific endpoint
*/
export declare function buildApiUrl(path: string, service?: 'subscription' | 'usage' | 'checkout' | 'general'): string;
export { DEFAULT_ENDPOINTS };