/** * Base configuration class for SCANOSS SDK services. * Provides common proxy and network configuration settings for HTTP and gRPC connections. */ export declare abstract class BaseConfig { /** HTTPS proxy server URL */ private _HTTPS_PROXY; /** HTTP proxy server URL */ private _HTTP_PROXY; /** Comma-separated list of hosts to bypass proxy for */ private _NO_PROXY; /** API URL for service connections */ private _API_URL; /** gRPC proxy server URL * @deprecated since v0.20.1 - Use HTTP_PROXY or HTTPS_PROXY instead. Will be removed in v1 * */ private _GRPC_PROXY; /** Path to the CA certificate file for SSL/TLS connections */ private _CA_CERT; /** Whether to ignore CA certificate errors */ private _IGNORE_CERT_ERRORS?; /** * Creates a new BaseConfig instance. * @param config - Optional configuration object to copy settings from */ constructor(config?: BaseConfig); /** * Returns the default SCANOSS API URL. * @returns The default API endpoint URL */ static getDefaultURL(): string; /** * Returns the premium SCANOSS API URL. * @returns The premium API endpoint URL */ static getPremiumURL(): string; /** * Resolves the appropriate API URL based on API key presence and current URL. * If an API key is provided and the current URL is the default, returns the premium * URL, otherwise returns the current URL. * @param apiKey - The API key (if any) * @param currentUrl - The current API URL * @returns The resolved API URL */ /** * Resolves the appropriate scanner URL based on API key presence and current URL. * If an API key is provided and the current URL is the default, returns the premium * scanner URL, otherwise appends '/scan/direct' to the current URL. * @param apiKey - The API key (if any) * @param currentUrl - The current API URL * @returns The resolved scanner URL */ protected resolveApiUrl(apiKey: string, currentUrl: string): string; /** * Sets the HTTPS proxy server URL. * @param value - HTTPS proxy URL */ set HTTPS_PROXY(value: string); /** * Sets the HTTP proxy server URL. * @param value - HTTP proxy URL */ set HTTP_PROXY(value: string); /** * Sets the comma-separated list of hosts to bypass proxy for. * @param value - NO_PROXY hosts list */ set NO_PROXY(value: string); /** * Sets the API URL for service connections with validation * @param value - The API URL (must start with http:// or https://) * @throws {Error} When the URL is empty, missing http/https protocol, or has invalid format */ set API_URL(value: string); /** * Sets the gRPC proxy server URL. * @param value - gRPC proxy URL * @deprecated since v0.20.1 - Use HTTP_PROXY or HTTPS_PROXY instead. Will be removed in v1 */ set GRPC_PROXY(value: string); /** * Sets the CA certificate file path for SSL/TLS connections. * @param caCertPath - Path to the CA certificate file * @throws {Error} When the certificate file does not exist or cannot be read */ set CA_CERT(caCertPath: string); /** * Sets whether to ignore CA certificate errors. * @param value - True to ignore certificate errors, false otherwise */ set IGNORE_CERT_ERRORS(value: boolean); /** * Gets the HTTPS proxy server URL. * @returns HTTPS proxy URL */ get HTTPS_PROXY(): string; /** * Gets the HTTP proxy server URL. * @returns HTTP proxy URL */ get HTTP_PROXY(): string; /** * Gets the comma-separated list of hosts to bypass proxy for. * @returns NO_PROXY hosts list */ get NO_PROXY(): string; /** * Gets the API URL for service connections. * @returns API URL */ get API_URL(): string; /** * Gets the gRPC proxy server URL. * @deprecated since v0.20.1 - Use HTTP_PROXY or HTTPS_PROXY instead. Will be removed in v1 * @returns gRPC proxy URL */ get GRPC_PROXY(): string; /** * Gets the path to the CA certificate file. * @returns CA certificate file path */ get CA_CERT(): string; /** * Gets whether CA certificate errors should be ignored. * @returns True if certificate errors are ignored, false otherwise */ get IGNORE_CERT_ERRORS(): boolean; }