/** * Energy Intelligence - Forecasts Resource * * Access EIA and IEA price and production forecasts with historical accuracy metrics. */ import type { OilPriceAPI } from "../../client.js"; /** * Forecast record */ export interface ForecastRecord { /** Record ID */ id: string; /** Forecast source (e.g., "EIA", "IEA") */ source?: string; /** Commodity or metric being forecasted */ commodity?: string; /** Forecast value */ forecast_value: number; /** Unit of measurement */ unit?: string; /** Forecast period (e.g., "Q1 2025", "2025") */ period?: string; /** Publication date */ published_date: string; /** Target date */ target_date?: string; /** ISO timestamp */ timestamp: string; /** Additional metadata */ metadata?: Record; } /** * Forecast summary */ export interface ForecastSummary { /** Number of forecasts */ total_forecasts: number; /** Latest forecast value */ latest_forecast?: number; /** Average forecast */ average_forecast?: number; /** As of date */ as_of_date: string; } /** * Price forecast data */ export interface PriceForecast { /** Commodity */ commodity: string; /** Forecast source */ source: string; /** Forecast price */ forecast_price: number; /** Unit */ unit: string; /** Target period */ period: string; /** Published date */ published_date: string; } /** * Production forecast data */ export interface ProductionForecast { /** Region or country */ region: string; /** Forecast source */ source: string; /** Forecast production */ forecast_production: number; /** Unit */ unit: string; /** Target period */ period: string; /** Published date */ published_date: string; } /** * Historical forecast data point */ export interface HistoricalForecast { /** Date */ date: string; /** Forecast value */ forecast_value: number; /** Actual value (if available) */ actual_value?: number; /** Accuracy percentage */ accuracy_percent?: number; } /** * Forecast comparison data */ export interface ForecastComparison { /** Period */ period: string; /** EIA forecast */ eia_forecast?: number; /** IEA forecast */ iea_forecast?: number; /** Actual value (if available) */ actual_value?: number; /** Difference between forecasts */ difference?: number; } /** * EI Forecasts Resource * * Access EIA and IEA price and production forecasts. * * @example * ```typescript * const client = new OilPriceAPI({ apiKey: 'your_key' }); * * // Get latest forecasts * const latest = await client.ei.forecasts.latest(); * console.log(`Latest forecast: ${latest.forecast_value} ${latest.unit}`); * * // Get price forecasts * const prices = await client.ei.forecasts.prices(); * prices.forEach(p => console.log(`${p.commodity}: $${p.forecast_price} (${p.source})`)); * ``` */ export declare class EIForecastsResource { private client; constructor(client: OilPriceAPI); /** * List all forecast records * * @returns Array of forecast records */ list(): Promise; /** * Get a specific forecast record * * @param id - Record ID * @returns Forecast record */ get(id: string): Promise; /** * Get latest forecast data * * @returns Latest forecast record */ latest(): Promise; /** * Get forecast summary * * @returns Forecast summary statistics */ summary(): Promise; /** * Get price forecasts * * @returns Array of price forecasts */ prices(): Promise; /** * Get production forecasts * * @returns Array of production forecasts */ production(): Promise; /** * Get historical forecast data * * @returns Array of historical forecasts with accuracy */ historical(): Promise; /** * Compare forecasts from different sources * * @returns Array of forecast comparisons */ compare(): Promise; }