themeparks - v9.0.0
    Preparing search index...

    Type Alias HistoryChanges

    HistoryChanges: AsyncGenerator<ChangeEntry, void, undefined> & {
        opening: Record<string, HistoryOpening>;
        load(): Promise<HistoryChanges>;
    }

    What HistoryApi.changeRows returns: the rows, and the state before them.

    It is the async generator it always was. for await yields the same { entityId, row } entries, and each row is the entity's complete live data from its time until the next row's.

    opening is the one thing the rows cannot tell you: the state in force at the START of the range, before the first change. Without it, the stretch between midnight and an entity's first change has no known status. On a night a ride runs past midnight that is real operating time, and a day rebuilt from the rows alone disagrees with the daily summary. It has an entry for every entity in the response, including one that did not change at all that day.

    Nothing is requested until the result is first used, as before. A getter cannot await, so opening is readable once the response has arrived: after the first step of iteration, or straight away with const changes = await history.changeRows(query).load(). Either way it is one request.

    Type Declaration

    • Readonlyopening: Record<string, HistoryOpening>

      The state at the start of the range, per entity id. Throws, saying how to get it, before the response has arrived, and says the request failed after one that did. Not enumerable, so spreading or logging the result is safe.

      An opening with degraded: true is incomplete: the server could not look far enough back for this response (degradedReason says why), so a field it holds may be missing. Ask again in a minute for the full opening.

    • load: function