From 351df1150f146b8e87dc9c1223c7f650ab852e0b Mon Sep 17 00:00:00 2001 From: Karl Waldman Date: Fri, 10 Jul 2026 10:18:56 -0400 Subject: [PATCH 1/2] fix: drop venue-typed source enums; align examples with market_reporting (#4175) Source fields are already free-string typed (no venue enum to loosen); this aligns example/fixture source values with the API switch to market_reporting masked labels (government labels like EIA/opec.org unchanged). Version bumped (patch, unpublished). Co-Authored-By: Claude Opus 4.8 --- CHANGELOG.md | 6 ++++++ package.json | 2 +- src/resources/futures.ts | 2 +- tests/resources/futures.test.ts | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cd8d64..6e728a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.2] - 2026-07-10 + +### Changed + +- Loosen `source` typing and align examples with the API's masked source labels: the response `source` now returns `market_reporting` for non-government series (government labels like `EIA`/`opec.org` are unchanged). The `FuturesPrice.source` field remains a free `string` (no venue enum); doc-comment and test fixture examples no longer use venue names such as `ICE`. See oilpriceapi-api#4175. + ## [1.0.1] - 2026-07-03 ### Changed diff --git a/package.json b/package.json index 494c72b..0e5ca02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oilpriceapi", - "version": "1.0.1", + "version": "1.0.2", "description": "Official Node.js SDK for Oil Price API - Real-time and historical oil & commodity prices", "type": "module", "main": "./dist/cjs/index.js", diff --git a/src/resources/futures.ts b/src/resources/futures.ts index 96f7653..fa4b041 100644 --- a/src/resources/futures.ts +++ b/src/resources/futures.ts @@ -49,7 +49,7 @@ export interface FuturesContractMonth { export interface FuturesPrice { /** Commodity identifier (e.g. "BRENT_FUTURES"). */ commodity?: string; - /** Data source (e.g. "ICE"). */ + /** Data source label (e.g. "market_reporting", or a government label like "EIA"). */ source?: string; /** ISO timestamp the data was last updated. */ updated_at?: string; diff --git a/tests/resources/futures.test.ts b/tests/resources/futures.test.ts index b8bcf30..a89ba45 100644 --- a/tests/resources/futures.test.ts +++ b/tests/resources/futures.test.ts @@ -25,7 +25,7 @@ describe("FuturesResource", () => { // structure in contracts[]. const mockPrice: FuturesPrice = { commodity: "WTI_FUTURES", - source: "ICE", + source: "market_reporting", updated_at: "2024-01-15T10:00:00Z", settlement_date: "2024-01-15", front_month: { From 97f202aaebcfb6d386d3eb30031b20a778ad5bab Mon Sep 17 00:00:00 2001 From: Karl Waldman Date: Fri, 10 Jul 2026 10:22:06 -0400 Subject: [PATCH 2/2] fix: sync SDK_VERSION to 1.0.2 to match package.json (#4175) Co-Authored-By: Claude Opus 4.8 --- src/version.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.ts b/src/version.ts index 498076c..cd6a1f2 100644 --- a/src/version.ts +++ b/src/version.ts @@ -7,7 +7,7 @@ * - X-Client-Version header * - Package.json (should match) */ -export const SDK_VERSION = "1.0.1"; +export const SDK_VERSION = "1.0.2"; /** * SDK identifier used in User-Agent and X-Api-Client headers