Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 59 additions & 7 deletions themeparks/_generated/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,22 +211,37 @@ class HistoryCoverageKindSpan(ApiModel):

class HistoryDailyExtremeWaits(ApiModel):
"""
How many wait readings of 480 minutes or more the day's statistics include. Such readings are usually feed errors (values like 999); they are counted here as a flag and stay in every statistic. Counted per reading while OPERATING. Present only when there were some, and then with both counts.
How many wait readings of 480 minutes or more the day had. Such readings are usually feed errors (values like 999); they are counted here as a flag. Those at or below the destination's plausibility ceiling stay in every statistic; those above it are left out and also counted in implausibleWaits. Wait values above 1440 minutes (24 hours) are feed errors and are omitted. Counted per reading while OPERATING. Present only when there were some, and then with both counts.
"""

standby: int
"""
Standby readings of 480 minutes or more included in the day's standby statistics.
Standby readings of 480 minutes or more.
"""
singleRider: int
"""
Single-rider readings of 480 minutes or more included in the day's single-rider statistics.
Single-rider readings of 480 minutes or more.
"""


class HistoryDailyImplausibleWaits(ApiModel):
"""
How many wait readings above the destination's plausibility ceiling the day had: 600 minutes, or 300 at destinations whose longest genuine waits are far shorter (listed in the history notes). Such a reading is a value the park's feed or app shows that cannot be a real queue (a placeholder like 999, or an unlabelled code); the live API still reports it as the park published it, and the raw history keeps it, but the day's statistics leave it out as if no wait were showing. Counted per reading while OPERATING. Present only when there were some, and then with both counts.
"""

standby: int
"""
Standby readings above the destination's plausibility ceiling, left out of the day's standby statistics.
"""
singleRider: int
"""
Single-rider readings above the destination's plausibility ceiling, left out of the day's single-rider statistics.
"""


class HistoryDailyStats(ApiModel):
"""
Wait statistics for the day. p50, mean and p90 are weighted by how many minutes each wait was showing; min and max are the extremes of every value posted. Only minutes where the entity was OPERATING (not unknown) and the wait was valid count. A wait is valid during the run and on the day it was posted; the wait showing when a ride opens counts from the opening if it last changed within 24 hours; a wait carried over midnight does not count until it changes. Nothing the park reported is excluded: a reading of 480 minutes or more stays in these statistics and is counted in the row's `extremeWaits`. Absent when no minute counted.
Wait statistics for the day. p50, mean and p90 are weighted by how many minutes each wait was showing; min and max are the extremes of every value posted. Only minutes where the entity was OPERATING (not unknown) and the wait was valid count. A wait is valid during the run and on the day it was posted; the wait showing when a ride opens counts from the opening if it last changed within 24 hours; a wait carried over midnight does not count until it changes. Wait values above 1440 minutes (24 hours) are feed errors and are omitted. So is a reading above the destination's plausibility ceiling (600 minutes, or 300 at the destinations the history notes list), which is counted in the row's `implausibleWaits` instead. Otherwise, a reading of 480 minutes or more stays in these statistics and is counted in the row's `extremeWaits`. Absent when no minute counted.
"""

min: int
Expand All @@ -247,7 +262,7 @@ class HistoryDailyStats(ApiModel):
"""
max: int
"""
Highest wait posted during the counted minutes, including a brief spike. It can be a feed error: the row's extremeWaits counts readings of 480 minutes or more.
Highest wait posted during the counted minutes, including a brief spike. It can be a feed error: the row's extremeWaits counts readings of 480 minutes or more. It never exceeds the destination's plausibility ceiling (see implausibleWaits).
"""


Expand Down Expand Up @@ -389,6 +404,33 @@ class HistoryErrorWindowExceeded(ApiModel):
error: Error9


class HistoryKnownGap(ApiModel):
"""
A window where nothing was observed for this entity's destination and nothing can be recovered. /history has no rows inside it and /history/daily counts its minutes as unknown. Rows either side are real.
"""

from_: Annotated[AwareDatetime, Field(alias="from")]
"""
First instant with no data (UTC, inclusive).
"""
to: AwareDatetime
"""
First instant with data again (UTC, exclusive).
"""
firstDay: date_aliased
"""
First park-local day the gap touches, partly or wholly.
"""
lastDay: date_aliased
"""
Last park-local day the gap touches, partly or wholly.
"""
reason: str
"""
Why the data is missing, in one sentence.
"""


class Degraded(Enum):
"""
Present, and true, when we could not look far enough back for this response, so the opening may be missing a field we hold. Ask again in a minute for the full opening.
Expand Down Expand Up @@ -867,6 +909,10 @@ class HistoryCoverageDocument(ApiModel):
"""
Keyed by live-data path (status, queue.StandbyQueue, showtimes and so on), as /live and /history name them. Fields the entity never reported are left out.
"""
knownGaps: list[HistoryKnownGap]
"""
Known archive gaps overlapping what this entity has recorded. Empty when none apply.
"""


class HistoryDailyInParkHours(ApiModel):
Expand All @@ -893,11 +939,12 @@ class HistoryDailyInParkHours(ApiModel):
standby: HistoryDailyStats | None = None
singleRider: HistoryDailyStats | None = None
extremeWaits: HistoryDailyExtremeWaits | None = None
implausibleWaits: HistoryDailyImplausibleWaits | None = None


class HistoryDailyRow(ApiModel):
"""
One day of an entity's history. standby, singleRider, extremeWaits, showCount and inParkHours are absent when there is nothing to report; a standby block needs a valid wait showing for at least one whole minute. A row without unknownMinutes was counted under earlier rules, and also lacks extremeWaits and inParkHours.
One day of an entity's history. standby, singleRider, extremeWaits, implausibleWaits, showCount and inParkHours are absent when there is nothing to report; a standby block needs a valid wait showing for at least one whole minute. A row without unknownMinutes was counted under earlier rules, and also lacks extremeWaits, implausibleWaits and inParkHours.
"""

date: date_aliased
Expand Down Expand Up @@ -927,6 +974,7 @@ class HistoryDailyRow(ApiModel):
standby: HistoryDailyStats | None = None
singleRider: HistoryDailyStats | None = None
extremeWaits: HistoryDailyExtremeWaits | None = None
implausibleWaits: HistoryDailyImplausibleWaits | None = None
showCount: int | None = None
"""
Distinct performance start times whose park-local day is this day. Present only for entities that published showtimes on the day.
Expand All @@ -940,7 +988,7 @@ class HistoryDailyRow(ApiModel):

class HistoryParkCoverageDocument(ApiModel):
"""
What history we hold across a whole PARK, returned by /history/coverage when the entity is a PARK. Its names map to the single-entity document: `fields` is `kinds`, and each `from` and `newest` is a `first` and `last`. It reports depth and breadth; it does not find missing days.
What history we hold across a whole PARK, returned by /history/coverage when the entity is a PARK. Its names map to the single-entity document: `fields` is `kinds`, and each `from` and `newest` is a `first` and `last`. It reports depth and breadth, and `knownGaps` lists the verified windows where nothing was observed; it does not search for other missing days.
"""

id: str
Expand All @@ -961,6 +1009,10 @@ class HistoryParkCoverageDocument(ApiModel):
"""
Every entity of the park history is held for.
"""
knownGaps: list[HistoryKnownGap]
"""
Known archive gaps overlapping what this park has recorded. Empty when none apply.
"""


class HistoryParkEntityDaily(ApiModel):
Expand Down
Loading