import { type FeedGame } from "./feeds.core.ts"; /** A regulation period, and an overtime in the regular season (the playoffs play twenty-minute overtimes): seconds. */ export declare const NHL_PERIOD = 1200; export declare const NHL_OVERTIME = 300; /** * Read a play-by-play shaped as the NHL's public one into a game: the puck's places at the plays that have one (between them it moves in a straight line), a mark for each shot, goal and whistle, the periods with their * clocks (a twenty-minute period, the board counting it down, an overtime of five minutes in the regular season and twenty in the playoffs, the shoot-out left out), each side's letters and name from the feed, and the players it names * (by `p` and their id). Times are the game's, so the board's clock is the game's: period 2 starts at 1200 s. Throws a `FeedError` when it is not of the shape, or has no play with a place. * @example * ```ts * import { nhlPlayByPlay } from "@johnmorrisdotca/kyogijo-stadiums/feeds"; * const answer = { * gameState: "LIVE", gameType: 2, * homeTeam: { id: 1, abbrev: "AAA", commonName: { default: "Aardvarks" } }, awayTeam: { id: 2, abbrev: "BBB" }, * plays: [ * { periodDescriptor: { number: 1, periodType: "REG" }, timeInPeriod: "00:00", typeDescKey: "faceoff", sortOrder: 1, details: { xCoord: 0, yCoord: 0 } }, * { periodDescriptor: { number: 1, periodType: "REG" }, timeInPeriod: "01:30", typeDescKey: "goal", sortOrder: 2, details: { xCoord: 80, yCoord: -4, eventOwnerTeamId: 1, scoringPlayerId: 9 } }, * ], * rosterSpots: [{ teamId: 1, playerId: 9, sweaterNumber: 19, firstName: { default: "Ada" }, lastName: { default: "Example" } }], * }; * const game = nhlPlayByPlay(answer); * console.log(game.timeline.events, game.teams.home, game.ended); * console.log(game.players.p9); * // [ { t: 90, kind: 'goal', x: 80, y: -4, team: 'home', by: 'p9' } ] { abbr: 'AAA', name: 'Aardvarks' } false * // { side: 'home', number: 19, name: 'Ada Example' } * ``` */ export declare function nhlPlayByPlay(json: unknown): FeedGame;