export * from './types'; export { AWSConnector } from './connectors/aws'; export { AzureConnector } from './connectors/azure'; export { GCPConnector } from './connectors/gcp'; import { CloudConnectorConfig, ScanResult, ScanOptions, OptimizationOpportunity, CloudResource } from './types'; /** * Optimisely Cloud SDK * * Main SDK class for scanning and analyzing cloud infrastructure across * AWS, Azure, and Google Cloud Platform. * * @example * ```typescript * import { OptimiselySDK } from '@optimisely/cloud-sdk'; * * const sdk = new OptimiselySDK({ * apiKey: 'opt_your_api_key_here' * }); * * const config = { * provider: 'aws', * credentials: { * aws: { * accessKeyId: 'your-access-key', * secretAccessKey: 'your-secret-key', * region: 'us-east-1' * } * } * }; * * const result = await sdk.scanCloud(config, { * includeCostAnalysis: true, * includeOptimizationRecommendations: true * }); * * console.log(`Found ${result.totalResources} resources`); * console.log(`Estimated monthly cost: $${result.estimatedMonthlyCost.total}`); * ``` */ export interface SDKOptions { apiKey: string; baseUrl?: string; timeout?: number; } export declare class OptimiselySDK { private version; private apiKey; private baseUrl; private timeout; /** * Initialize the SDK with API key and configuration */ constructor(options: SDKOptions); /** * Get SDK version */ getVersion(): string; /** * Validate API key format */ private isValidApiKeyFormat; /** * Validate API key with the server (public method) */ validateApiKey(): Promise; /** * Private method to validate API key during operations (throws on failure) */ private validateApiKeyInternal; /** * Scan cloud infrastructure and return detailed resource analysis * * @param config - Cloud provider configuration * @param options - Scan options to customize the analysis * @returns Promise containing scan results * * @throws Error if provider is not supported or credentials are invalid */ scanCloud(config: CloudConnectorConfig, options?: ScanOptions): Promise; /** * Scan multiple cloud providers simultaneously * * @param configs - Array of cloud provider configurations * @param options - Scan options applied to all providers * @returns Promise containing array of scan results */ scanMultipleProviders(configs: CloudConnectorConfig[], options?: ScanOptions): Promise; /** * Get cost analysis for specific resource types * * @param config - Cloud provider configuration * @param resourceTypes - Array of resource types to analyze * @returns Promise containing cost breakdown */ getCostAnalysis(config: CloudConnectorConfig, resourceTypes?: string[]): Promise<{ total: number; currency: string; breakdown: Record; resources: CloudResource[]; }>; /** * Get optimization recommendations * * @param config - Cloud provider configuration * @param severity - Minimum severity level to include * @returns Promise containing optimization opportunities */ getOptimizationRecommendations(config: CloudConnectorConfig, severity?: 'low' | 'medium' | 'high' | 'critical'): Promise; /** * Compare costs across multiple cloud providers * * @param configs - Array of cloud provider configurations * @param resourceTypes - Array of resource types to compare * @returns Promise containing cost comparison */ compareProviderCosts(configs: CloudConnectorConfig[], resourceTypes?: string[]): Promise<{ providers: Array<{ provider: string; totalCost: number; breakdown: Record; resourceCount: number; }>; recommendations: { cheapest: string; savings: number; migrationComplexity: 'low' | 'medium' | 'high'; }; }>; /** * Export scan results in various formats * * @param result - Scan result to export * @param format - Export format * @returns Formatted string */ exportResults(result: ScanResult, format?: 'json' | 'yaml' | 'csv' | 'xml'): string; /** * Validate provider configuration */ private validateConfig; /** * Create appropriate connector based on provider */ private createConnector; /** * Estimate migration complexity between providers */ private estimateMigrationComplexity; } export default OptimiselySDK; //# sourceMappingURL=index.d.ts.map