From d26f2a3437d9fbbaa2b3ed9de23c8ee044d3aef4 Mon Sep 17 00:00:00 2001 From: Jamie Holding Date: Tue, 8 Sep 2026 15:04:26 +0100 Subject: [PATCH] docs: correct the 8.0.0 changelog purchases example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two errors in the example shipped with 8.0.0, both mine. `entity(id).schedule` is a property holding a ScheduleApi, not a method, so the snippet as written threw 'schedule is not a function'. The call is `.schedule.upcoming()`. The snippet also filtered on `day.type === 'TICKETED_EVENT'`, which matches nothing useful: purchases are Lightning Lane entries attached to ordinary OPERATING days. Measured against Magic Kingdom today — 48 TICKETED_EVENT entries with no purchases, 26 OPERATING entries with them. The filter is removed and the distinction called out, since filtering on type is the obvious wrong guess. The example is now run verbatim against the published 8.0.0 package rather than written from memory of the API. The entry count is stated as a dated snapshot because the schedule window rolls. No code change; the package is unaffected. Co-Authored-By: Claude Opus 5 (1M context) --- CHANGELOG.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f122c0..5d16d53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,18 +15,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 path is the one this client uses, so `purchases` was invisible and `type` was a bare `string`. - Magic Kingdom alone serves 27 schedule entries carrying `purchases`. If you - reached them before, you did it with a cast. You no longer need to: + Magic Kingdom served 26 of 79 upcoming entries with `purchases` on the day + this shipped. If you reached them before, you did it with a cast. You no + longer need to: ```ts - const sched = await tp.entity(parkId).schedule(); + const sched = await tp.entity(parkId).schedule.upcoming(); for (const day of sched.schedule ?? []) { - if (day.type === 'TICKETED_EVENT') { - for (const p of day.purchases ?? []) console.log(p.name, p.price.amount); + for (const p of day.purchases ?? []) { + console.log(day.date, p.name, p.price.amount, p.price.currency); + // 2026-09-08 Lightning Lane for Seven Dwarfs Mine Train 1100 USD } } ``` + Purchases are not limited to `TICKETED_EVENT` days — Lightning Lane entries + attach to ordinary `OPERATING` days, so do not filter on `type` to find + them. + - **`purchases[].price.amount` is nullable, matching `PriceData`.** 7.1.0 made `PriceData.amount` nullable but the schedule path carried a second, inline copy of the price shape that kept `amount` non-nullable. Both now resolve to