/** * Historical Data Service for Indonesian Stock Market data * Integrates with Dataset-Saham-IDX repository */ import { RepositoryInfo } from '../utils/github-api'; import { ParsedStockData, StockDataPoint } from './csv-parser'; export interface HistoricalDataOptions { useCache?: boolean; cacheTTL?: number; forceRefresh?: boolean; } export interface StockMetadata { ticker: string; lastUpdated: Date; dataPoints: number; dateRange: { start: Date; end: Date; }; fileSize: number; } export declare class HistoricalDataService { private githubApi; private dataDir; private metadataDir; private defaultCacheTTL; constructor(); /** * Ensure required directories exist */ private ensureDirectories; /** * Get historical data for a specific stock */ getStockData(ticker: string, options?: HistoricalDataOptions): Promise; /** * Get historical data for multiple stocks */ getMultipleStocksData(tickers: string[], options?: HistoricalDataOptions): Promise>; /** * Get available stock tickers from the repository */ getAvailableStocks(): Promise; /** * Get repository information */ getRepositoryInfo(): Promise; /** * Check if stock data is available */ isStockAvailable(ticker: string): Promise; /** * Get stock data for a specific time period */ getStockDataForPeriod(ticker: string, period: string, options?: HistoricalDataOptions): Promise; /** * Get stock data for a custom date range */ getStockDataForDateRange(ticker: string, startDate: Date, endDate: Date, options?: HistoricalDataOptions): Promise; /** * Get metadata for cached stocks */ getCachedStockMetadata(): Promise; /** * Clear cache for a specific stock or all stocks */ clearCache(ticker?: string): Promise; /** * Get cached data if available and not expired */ private getCachedData; /** * Cache parsed data and metadata */ private cacheData; /** * Utility function to chunk array into smaller arrays */ private chunkArray; } //# sourceMappingURL=historical-data-service.d.ts.map