@allratestoday/sdk 1.4.4 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,30 @@
1
+ # Changelog — @allratestoday/sdk
2
+
3
+ ## 1.5.0 — 2026-10-16
4
+
5
+ ### Fixed
6
+ - `symbols()` returned an empty `symbols` object: the API returns a `currencies` list, which is now mapped to `symbols` (code → name). The full list is also returned as `currencies`, with `count`. No API key needed any more.
7
+ - `forDate()`, `timeSeries()` and `convert(..., { date })` returned empty rates or `0`: they now read the market-history windows the API actually serves (7 days, 30 days, 1 year) and pick the requested days.
8
+ - `getHistoricalRates()` returned `rates: undefined`: the API's `data` points are now mapped to `rates` and `current`, and also returned raw as `data`.
9
+ - `getRate(from, to)` without an amount returned an array instead of `RateResponse`; it is now normalised to the documented shape.
10
+ - `getRates()` always returns an array.
11
+
12
+ ### Added
13
+ - `officialRatesOn(bank, date, options?)`: official table or pair as published on a date (keyed), including cross pairs and each bank's full archive.
14
+ - `AllRatesTodayError.code` (`missing_key`, `invalid_argument`, `http`, `timeout`, `network`) and `details` (parsed API error body, e.g. quota fields on 429). Timeouts and network failures are now wrapped in `AllRatesTodayError` instead of surfacing as raw `TimeoutError` / `TypeError`.
15
+ - `ForDateResponse.rateDates` and `ConvertResponse.rateDate`: the date of the data point actually used.
16
+ - Exported types `HistoryPeriod`, `HistoryPoint`, `CurrencyInfo`, `DatedOfficialRatesResponse`, `AllRatesTodayErrorCode`.
17
+ - Input validation: malformed and future dates, start after end, and market dates older than 365 days throw `invalid_argument` before any request.
18
+
19
+ ### Changed
20
+ - `forDate()` and `timeSeries()` now require `symbols` (one history request per symbol). Calls without symbols previously returned no data.
21
+ - README rewritten: market vs official rates, browser key safety, rate definitions, full method reference with live responses, error codes, retries, quotas, compatibility.
22
+
23
+ ## 1.4.5 — 2026-10-14
24
+ - npm keywords.
25
+
26
+ ## 1.4.0 — 2026-10-01
27
+ - Added keyless `officialRates()` and `officialSources()` for central-bank and tax-authority tables.
28
+
29
+ ## 1.3.10 — 2026-09-30
30
+ - README wording.