nhl-api-ts 0.2.1 → 0.3.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.
Files changed (40) hide show
  1. package/README.md +72 -5
  2. package/dist/api/draft.d.mts +61 -0
  3. package/dist/api/draft.mjs +68 -0
  4. package/dist/api/edge.d.mts +198 -1
  5. package/dist/api/edge.mjs +207 -4
  6. package/dist/api/game-center.d.mts +49 -1
  7. package/dist/api/game-center.mjs +47 -0
  8. package/dist/api/misc.d.mts +115 -1
  9. package/dist/api/misc.mjs +147 -2
  10. package/dist/api/players.d.mts +55 -3
  11. package/dist/api/players.mjs +80 -3
  12. package/dist/api/query/cayenne.d.mts +4 -0
  13. package/dist/api/query/cayenne.mjs +13 -0
  14. package/dist/api/query/sorting/sorting-options.d.mts +8 -0
  15. package/dist/api/query/sorting/sorting-options.mjs +30 -0
  16. package/dist/api/schedule.d.mts +19 -6
  17. package/dist/api/schedule.mjs +17 -5
  18. package/dist/api/stats.d.mts +95 -6
  19. package/dist/api/stats.mjs +130 -30
  20. package/dist/api/teams.d.mts +43 -3
  21. package/dist/api/teams.mjs +51 -3
  22. package/dist/cli/commands.mjs +487 -22
  23. package/dist/http-client.d.mts +2 -1
  24. package/dist/http-client.mjs +8 -1
  25. package/dist/index.d.mts +8 -2
  26. package/dist/index.mjs +3 -0
  27. package/dist/nhl-client.d.mts +69 -14
  28. package/dist/nhl-client.mjs +33 -12
  29. package/dist/types/draft.d.mts +97 -0
  30. package/dist/types/draft.mjs +1 -0
  31. package/dist/types/edge.d.mts +299 -3
  32. package/dist/types/game-center.d.mts +223 -8
  33. package/dist/types/index.d.mts +1 -0
  34. package/dist/types/misc.d.mts +101 -0
  35. package/dist/types/misc.mjs +0 -1
  36. package/dist/types/players.d.mts +22 -0
  37. package/dist/types/schedule.d.mts +16 -0
  38. package/dist/types/stats.d.mts +207 -1
  39. package/dist/types/teams.d.mts +29 -1
  40. package/package.json +1 -1
package/README.md CHANGED
@@ -73,8 +73,12 @@ optional.
73
73
  ### teams
74
74
 
75
75
  - `teams({ [date] })` — all teams with conference, division and `franchise_id`
76
- - `teamRoster({ teamAbbr, season })`
76
+ - `teamRoster({ teamAbbr, [season] })` — no `season` → current roster
77
+ - `rosterSeasons({ teamAbbr })` — every season the team has a roster for
78
+ - `teamScoreboard({ teamAbbr })` — recent and upcoming games
77
79
  - `franchises()`
80
+ - `statsTeams()` — every team in the stats API, past and present (raw rows with `franchiseId`, `triCode`)
81
+ - `teamById({ teamId })` — one stats API team row; an unknown id throws `ResourceNotFoundException`
78
82
 
79
83
  ### standings
80
84
 
@@ -87,10 +91,11 @@ optional.
87
91
  - `weeklySchedule({ [date] })`
88
92
  - `teamMonthlySchedule({ teamAbbr, [month] })`
89
93
  - `teamWeeklySchedule({ teamAbbr, [date] })`
90
- - `teamSeasonSchedule({ teamAbbr, season })`
91
- - `calendarSchedule({ date })`
94
+ - `teamSeasonSchedule({ teamAbbr, [season] })`
95
+ - `calendarSchedule({ [date] })`
92
96
  - `playoffCarousel({ season })`
93
97
  - `playoffSeriesSchedule({ season, series })`
98
+ - `playoffSeriesMeta({ year, series })` — round title and the two seeded teams
94
99
  - `playoffBracket({ year })`
95
100
 
96
101
  ### gameCenter
@@ -102,16 +107,26 @@ optional.
102
107
  - `shiftChartData({ gameId, [excludes] })`
103
108
  - `seasonSeriesMatchup({ gameId })`
104
109
  - `gameStory({ gameId })`
110
+ - `scoreboard({ [date] })` — every game in the week around a date, grouped by date
111
+ - `wscPlayByPlay({ gameId })` — flat play array (a different shape from `playByPlay`)
112
+ - `playReplay({ gameId, eventNumber })` — replay card for one event; `goal` only for goals (experimental)
113
+ - `gameMeta({ gameId })` — teams, season state and game state
105
114
 
106
115
  ### stats
107
116
 
108
117
  - `gametypesPerSeasonDirectoryByTeam({ teamAbbr })`
109
118
  - `playerCareerStats({ playerId })`
110
- - `playerGameLog({ playerId, seasonId, gameType })`
119
+ - `playerGameLog({ playerId, [seasonId], [gameType] })`
120
+ - `skaterStatsLeaders({ [season], [gameType], [categories], [limit] })` — leaders keyed by category (`goals`, `points`, `toi`, ...); `limit: -1` returns every player
121
+ - `goalieStatsLeaders({ [season], [gameType], [categories], [limit] })` — `wins`, `shutouts`, `savePctg`, `goalsAgainstAverage`
122
+ - `clubStats({ teamAbbr, [season], [gameType] })` — a team's skater and goalie stats
111
123
  - `teamSummary({ startSeason, endSeason, [gameTypeId], [isGame], [isAggregate], [sortExpr], [start], [limit], [factCayenneExp], [defaultCayenneExp] })`
112
124
  - `skaterStatsSummary({ startSeason, endSeason, [franchiseId], [gameTypeId], [aggregate], [sortExpr], [start], [limit], [factCayenneExp], [defaultCayenneExp] })`
113
125
  - `skaterStatsWithQueryContext({ queryContext, reportType, [sortExpr], [aggregate], [start], [limit] })`
114
126
  - `goalieStatsSummary({ startSeason, [endSeason], [statsType], [gameTypeId], [franchiseId], [aggregate], [sortExpr], [start], [limit], [factCayenneExp], [defaultCayenneExp] })`
127
+ - `skaterLeaders({ attribute, [season] })` — top 10 single-season records, all time or for one `season`; `attribute` is `points`, `goals`, `assists` or `gamesPlayed`
128
+ - `goalieLeaders({ attribute, [season] })` — same, for `gaa`, `savePctg`, `shutouts`, `timeOnIce` or `gamesPlayed`. `gaa` / `savePctg` have no minimum games, so the top rows are goalies with a few minutes played (all-time `gaa` is `null`)
129
+ - `skaterMilestones()`, `goalieMilestones()` — career milestones active players are approaching
115
130
 
116
131
  ### edge
117
132
 
@@ -129,16 +144,68 @@ default; 3 = playoffs). Without `season` the current season (`/now`) is used.
129
144
  `teamZoneTimeDetails`, `teamShotLocationDetail`, `teamShotSpeedDetail`,
130
145
  `teamSkatingSpeedDetail`
131
146
  - Landing pages (no id): `skaterLanding`, `goalieLanding`, `teamLanding`
147
+ - Team comparison (`{ teamId }`): `teamComparison`
148
+ - League highlights: `byTheNumbers({ [season], [gameType] })`. Without `season`
149
+ it covers the latest game night; with one, the season bests
150
+ - Leaderboards (top 10, no id). Each returns a bare array of 10 rows that carry
151
+ every metric of that leaderboard; `sortBy` (required) only picks the order.
152
+ `positions` (`'all'`, `'forwards'`, `'defense'`; see `EdgePositions`),
153
+ `strength` (`'all'`, `'es'`, `'pp'`, `'pk'`; see `EdgeStrengths`) and the
154
+ shot-location `category` (`'all'`, `'high'`, `'mid'`, `'long'`) default to
155
+ `'all'`:
156
+ - Skaters: `skaterDistanceTop10({ [positions], [strength], sortBy })`,
157
+ `skaterSpeedTop10({ [positions], sortBy })`,
158
+ `skaterZoneTimeTop10({ [positions], [strength], sortBy })`,
159
+ `skaterShotSpeedTop10({ [positions], sortBy })`,
160
+ `skaterShotLocationTop10({ [positions], sortBy, [category] })`
161
+ - Goalies: `goalie5v5Top10({ sortBy })`,
162
+ `goalieShotLocationTop10({ sortBy, [category] })`,
163
+ `goalieSavePercentageTop10({ sortBy })`
164
+ - Teams: `teamSkatingDistanceTop10({ [positions], [strength], sortBy })`,
165
+ `teamSkatingSpeedTop10({ [positions], sortBy })`,
166
+ `teamZoneTimeTop10({ [strength], sortBy })`,
167
+ `teamShotSpeedTop10({ [positions], sortBy })`,
168
+ `teamShotLocationTop10({ [positions], sortBy, [category] })`
169
+ - Zone-time `sortBy` is the zone (`EdgeZones`: `'offensive'`, `'neutral'`,
170
+ `'defensive'`); the other `sortBy` values are typed per method (e.g.
171
+ `EdgeSkatingDistanceSortBy`: `'total'`, `'per-60'`, `'max-game'`,
172
+ `'max-period'`)
132
173
 
133
174
  ### players
134
175
 
135
176
  - `prospectsByTeam({ teamAbbr })`
136
- - `playersByTeam({ teamAbbr, season })`
177
+ - `playersByTeam({ teamAbbr, [season] })`
178
+ - `playerSpotlight()`
179
+ - `playerSearch({ [name], [teamId], [position], [cayenneExp], [sort], [dir], [start], [include], [exclude] })` — search every player on record, e.g. `{ name: 'matth', position: 'C' }`. `name` is a case-insensitive part of the full name; `position: 'F'` matches every forward; at least one filter is required. Returns `{ data, total }`; the API sends **at most 5 rows** per request, so page with `start`
180
+
181
+ ### draft
182
+
183
+ Draft years are **YYYY** (`2023`), not `YYYYYYYY`. Without `season` the
184
+ current draft (`/now`) is used.
185
+
186
+ - `rankings({ [season], [category] })` — Central Scouting rankings.
187
+ `category` is a `ProspectCategory` (1 NA skater, the default; 2 Intl skater;
188
+ 3 NA goalie; 4 Intl goalie)
189
+ - `tracker()` — the live draft tracker for the current draft
190
+ - `picks({ [season], [round] })` — picks for round `1`-`7` or `'all'` (the
191
+ default). `picks()` without a season returns round **1** of the current
192
+ draft, since the API redirects `draft/picks/now` there
193
+
194
+ Rounds per draft year live in `misc.draftYearAndRounds()`.
137
195
 
138
196
  ### misc
139
197
 
140
198
  - `glossary()`, `config()`, `countries()`, `seasonSpecificRulesAndInfo()`,
141
199
  `draftYearAndRounds()`
200
+ - `componentSeasons()` — the season and game type the stats API serves by default
201
+ - `games({ [season], [gameType], [teamId], [startDate], [endDate], [cayenneExp] })` — stats API games, e.g. `{ season: 20232024, teamId: 10 }`. At least one filter is required (unfiltered is every game ever, about 19 MB)
202
+ - `ping()` — stats API health check; resolves `true`, and throws on any failure (it never returns `false`)
203
+ - `seasonIds()` — every season id (`19171918` ... current)
204
+ - `tvSchedule({ [date] })` — national TV broadcasts for the week around a date
205
+ - `meta({ [players], [teams] })` — display metadata (names, slugs, headshots) for player ids and team abbreviations
206
+ - `partnerGameOdds({ countryCode })` — today's betting odds (experimental)
207
+ - `location()` — the caller's country from their IP (experimental)
208
+ - `postalLookup({ postalCode })` — teams whose broadcast market covers a postal code (experimental)
142
209
 
143
210
  ### helpers
144
211
 
@@ -0,0 +1,61 @@
1
+ import type { Context } from '#src/context.mjs';
2
+ import type { DraftPicks, DraftRankings, DraftTracker } from '#src/types/index.mjs';
3
+ import type { Id } from '#src/utils.mjs';
4
+ /** Prospect list of the NHL Central Scouting draft rankings. */
5
+ export declare const ProspectCategory: {
6
+ readonly NORTH_AMERICAN_SKATER: 1;
7
+ readonly INTERNATIONAL_SKATER: 2;
8
+ readonly NORTH_AMERICAN_GOALIE: 3;
9
+ readonly INTERNATIONAL_GOALIE: 4;
10
+ };
11
+ export type ProspectCategory = (typeof ProspectCategory)[keyof typeof ProspectCategory];
12
+ /** Draft round 1-7, or 'all' for every round. */
13
+ export type DraftRound = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 'all';
14
+ export interface DraftRankingsParams {
15
+ /** Draft year in YYYY format, e.g. 2023. Defaults to the current draft ("now"). */
16
+ season?: Id;
17
+ /** 1=NA skater (default), 2=Intl skater, 3=NA goalie, 4=Intl goalie. Ignored when `season` is omitted. */
18
+ category?: ProspectCategory;
19
+ }
20
+ export interface DraftPicksParams {
21
+ /** Draft year in YYYY format, e.g. 2023. Defaults to the current draft ("now"). */
22
+ season?: Id;
23
+ /** Round 1-7 or 'all' (default). Ignored when `season` is omitted. */
24
+ round?: DraftRound;
25
+ }
26
+ /**
27
+ * Gets the NHL Central Scouting rankings for one prospect category. The API
28
+ * has no season-only route, so `category` defaults to 1 when `season` is
29
+ * given; without `season` the current draft's North American skaters come
30
+ * back and `category` is ignored.
31
+ *
32
+ * @param params.season Draft year in YYYY format (not YYYYYYYY), e.g. 2023. Defaults to "now".
33
+ * @param params.category 1=NA skater, 2=Intl skater, 3=NA goalie, 4=Intl goalie. See `ProspectCategory`.
34
+ * @throws RangeError If `category` is not 1-4
35
+ * @example https://api-web.nhle.com/v1/draft/rankings/2023/1
36
+ */
37
+ export declare function rankings(ctx: Context, { season, category, }?: DraftRankingsParams): Promise<DraftRankings>;
38
+ /**
39
+ * Gets the live draft tracker: the current draft's broadcast info, state
40
+ * and the picks of the round in progress (or the last round, once the draft
41
+ * is over).
42
+ *
43
+ * @example https://api-web.nhle.com/v1/draft-tracker/picks/now
44
+ */
45
+ export declare function tracker(ctx: Context): Promise<DraftTracker>;
46
+ /**
47
+ * Gets the picks of a draft. Note the defaults differ: `picks()` hits
48
+ * `draft/picks/now`, which the API redirects to round **1** of the current
49
+ * draft, while `picks({ season })` returns every round.
50
+ *
51
+ * @param params.season Draft year in YYYY format (not YYYYYYYY), e.g. 2023. Defaults to "now".
52
+ * @param params.round Round 1-7 or 'all'. Defaults to 'all' when `season` is given.
53
+ * @throws RangeError If `round` is not 1-7 or 'all'
54
+ * @example https://api-web.nhle.com/v1/draft/picks/2023/all
55
+ */
56
+ export declare function picks(ctx: Context, { season, round }?: DraftPicksParams): Promise<DraftPicks>;
57
+ export declare const draftApi: {
58
+ readonly rankings: typeof rankings;
59
+ readonly tracker: typeof tracker;
60
+ readonly picks: typeof picks;
61
+ };
@@ -0,0 +1,68 @@
1
+ import { Endpoint } from '#src/http-client.mjs';
2
+ /** Prospect list of the NHL Central Scouting draft rankings. */
3
+ export const ProspectCategory = {
4
+ NORTH_AMERICAN_SKATER: 1,
5
+ INTERNATIONAL_SKATER: 2,
6
+ NORTH_AMERICAN_GOALIE: 3,
7
+ INTERNATIONAL_GOALIE: 4,
8
+ };
9
+ function inRange(value, min, max) {
10
+ return (Number.isInteger(value) && Number(value) >= min && Number(value) <= max);
11
+ }
12
+ async function getWeb(ctx, resource) {
13
+ return (await ctx.get(Endpoint.API_WEB_V1, resource)).json();
14
+ }
15
+ /**
16
+ * Gets the NHL Central Scouting rankings for one prospect category. The API
17
+ * has no season-only route, so `category` defaults to 1 when `season` is
18
+ * given; without `season` the current draft's North American skaters come
19
+ * back and `category` is ignored.
20
+ *
21
+ * @param params.season Draft year in YYYY format (not YYYYYYYY), e.g. 2023. Defaults to "now".
22
+ * @param params.category 1=NA skater, 2=Intl skater, 3=NA goalie, 4=Intl goalie. See `ProspectCategory`.
23
+ * @throws RangeError If `category` is not 1-4
24
+ * @example https://api-web.nhle.com/v1/draft/rankings/2023/1
25
+ */
26
+ export async function rankings(ctx, { season, category = ProspectCategory.NORTH_AMERICAN_SKATER, } = {}) {
27
+ if (!inRange(category, 1, 4)) {
28
+ throw new RangeError(`Invalid prospect category ${category}. Use 1-4 (see ProspectCategory).`);
29
+ }
30
+ if (season === undefined || season === null) {
31
+ return getWeb(ctx, 'draft/rankings/now');
32
+ }
33
+ return getWeb(ctx, `draft/rankings/${season}/${category}`);
34
+ }
35
+ /**
36
+ * Gets the live draft tracker: the current draft's broadcast info, state
37
+ * and the picks of the round in progress (or the last round, once the draft
38
+ * is over).
39
+ *
40
+ * @example https://api-web.nhle.com/v1/draft-tracker/picks/now
41
+ */
42
+ export async function tracker(ctx) {
43
+ return getWeb(ctx, 'draft-tracker/picks/now');
44
+ }
45
+ /**
46
+ * Gets the picks of a draft. Note the defaults differ: `picks()` hits
47
+ * `draft/picks/now`, which the API redirects to round **1** of the current
48
+ * draft, while `picks({ season })` returns every round.
49
+ *
50
+ * @param params.season Draft year in YYYY format (not YYYYYYYY), e.g. 2023. Defaults to "now".
51
+ * @param params.round Round 1-7 or 'all'. Defaults to 'all' when `season` is given.
52
+ * @throws RangeError If `round` is not 1-7 or 'all'
53
+ * @example https://api-web.nhle.com/v1/draft/picks/2023/all
54
+ */
55
+ export async function picks(ctx, { season, round = 'all' } = {}) {
56
+ if (round !== 'all' && !inRange(round, 1, 7)) {
57
+ throw new RangeError(`Invalid draft round ${round}. Use 1-7 or 'all'.`);
58
+ }
59
+ if (season === undefined || season === null) {
60
+ return getWeb(ctx, 'draft/picks/now');
61
+ }
62
+ return getWeb(ctx, `draft/picks/${season}/${round}`);
63
+ }
64
+ export const draftApi = {
65
+ rankings,
66
+ tracker,
67
+ picks,
68
+ };
@@ -1,5 +1,5 @@
1
1
  import type { Context } from '#src/context.mjs';
2
- import type { CatGoalieDetail, CatSkaterDetail, Goalie5v5Detail, GoalieComparison, GoalieDetail, GoalieLanding, GoalieSavePercentageDetail, GoalieShotLocationDetail, SkaterComparison, SkaterDetail, SkaterLanding, SkaterShotLocationDetail, SkaterShotSpeedDetail, SkaterSkatingDistanceDetail, SkaterSkatingSpeedDetail, SkaterZoneTime, TeamDetail, TeamLanding, TeamShotLocationDetail, TeamShotSpeedDetail, TeamSkatingDistanceDetail, TeamSkatingSpeedDetail, TeamZoneTimeDetails } from '#src/types/index.mjs';
2
+ import type { ByTheNumbers, CatGoalieDetail, CatSkaterDetail, Goalie5v5Detail, Goalie5v5Top10Row, GoalieComparison, GoalieDetail, GoalieLanding, GoalieSavePercentageDetail, GoalieSavePercentageTop10Row, GoalieShotLocationDetail, GoalieShotLocationTop10Row, OpenUnion, SkaterComparison, SkaterDetail, SkaterDistanceTop10Row, SkaterLanding, SkaterShotLocationDetail, SkaterShotLocationTop10Row, SkaterShotSpeedDetail, SkaterShotSpeedTop10Row, SkaterSkatingDistanceDetail, SkaterSkatingSpeedDetail, SkaterSpeedTop10Row, SkaterZoneTime, SkaterZoneTimeTop10Row, TeamComparison, TeamDetail, TeamLanding, TeamShotLocationDetail, TeamShotLocationTop10Row, TeamShotSpeedDetail, TeamShotSpeedTop10Row, TeamSkatingDistanceDetail, TeamSkatingDistanceTop10Row, TeamSkatingSpeedDetail, TeamSkatingSpeedTop10Row, TeamZoneTimeDetails, TeamZoneTimeTop10Row } from '#src/types/index.mjs';
3
3
  import type { Id } from '#src/utils.mjs';
4
4
  export interface EdgeSeasonParams {
5
5
  /** Season in YYYYYYYY format, e.g. 20232024. Defaults to the current season ("now"). */
@@ -15,6 +15,61 @@ export interface EdgeTeamParams extends EdgeSeasonParams {
15
15
  /** NHL team id, e.g. 10 */
16
16
  teamId: Id;
17
17
  }
18
+ /** Player positions of an EDGE top-10 leaderboard. */
19
+ export declare const EdgePositions: {
20
+ readonly ALL: 'all';
21
+ readonly FORWARDS: 'forwards';
22
+ readonly DEFENSE: 'defense';
23
+ };
24
+ export type EdgePosition = OpenUnion<(typeof EdgePositions)[keyof typeof EdgePositions]>;
25
+ /** Game strengths of an EDGE top-10 leaderboard. */
26
+ export declare const EdgeStrengths: {
27
+ readonly ALL: 'all';
28
+ readonly EVEN: 'es';
29
+ readonly POWER_PLAY: 'pp';
30
+ readonly PENALTY_KILL: 'pk';
31
+ };
32
+ export type EdgeStrength = OpenUnion<(typeof EdgeStrengths)[keyof typeof EdgeStrengths]>;
33
+ /** Rink zones; the `sortBy` of the zone time top-10s. */
34
+ export declare const EdgeZones: {
35
+ readonly OFFENSIVE: 'offensive';
36
+ readonly NEUTRAL: 'neutral';
37
+ readonly DEFENSIVE: 'defensive';
38
+ };
39
+ export type EdgeZone = OpenUnion<(typeof EdgeZones)[keyof typeof EdgeZones]>;
40
+ export type EdgeSkatingDistanceSortBy = OpenUnion<'total' | 'per-60' | 'max-game' | 'max-period'>;
41
+ export type EdgeSkatingSpeedSortBy = OpenUnion<'max' | 'over-22' | '20-22' | '18-20'>;
42
+ export type EdgeShotSpeedSortBy = OpenUnion<'max' | 'over-100' | '90-99' | '80-89' | '70-79'>;
43
+ export type EdgeShotLocationSortBy = OpenUnion<'sog' | 'goals' | 'shooting-pctg'>;
44
+ /** Shot location area: every shot, high danger, mid range or long range. */
45
+ export type EdgeShotLocationCategory = OpenUnion<'all' | 'high' | 'mid' | 'long'>;
46
+ export type EdgeGoalieShotLocationSortBy = OpenUnion<'save-pctg' | 'saves' | 'goals-against' | 'shots-against'>;
47
+ export type EdgeGoalie5v5SortBy = OpenUnion<'save-pctg' | 'save-pctg-close' | 'shots' | 'shots-per-60'>;
48
+ export type EdgeGoalieSavePercentageSortBy = OpenUnion<'games' | 'pctg'>;
49
+ export interface EdgeTop10Params<SortBy extends string> extends EdgeSeasonParams {
50
+ /** Metric to rank by. Every row carries every metric; this only reorders. */
51
+ sortBy: SortBy;
52
+ }
53
+ export interface EdgePositionTop10Params<SortBy extends string> extends EdgeTop10Params<SortBy> {
54
+ /** 'all' (default), 'forwards' or 'defense'. See `EdgePositions`. */
55
+ positions?: EdgePosition;
56
+ }
57
+ export interface EdgeStrengthTop10Params<SortBy extends string> extends EdgePositionTop10Params<SortBy> {
58
+ /** 'all' (default), 'es', 'pp' or 'pk'. See `EdgeStrengths`. */
59
+ strength?: EdgeStrength;
60
+ }
61
+ export interface EdgeShotLocationTop10Params extends EdgePositionTop10Params<EdgeShotLocationSortBy> {
62
+ /** 'all' (default), 'high', 'mid' or 'long'. */
63
+ category?: EdgeShotLocationCategory;
64
+ }
65
+ export interface EdgeTeamZoneTimeTop10Params extends EdgeTop10Params<EdgeZone> {
66
+ /** 'all' (default), 'es', 'pp' or 'pk'. See `EdgeStrengths`. */
67
+ strength?: EdgeStrength;
68
+ }
69
+ export interface EdgeGoalieShotLocationTop10Params extends EdgeTop10Params<EdgeGoalieShotLocationSortBy> {
70
+ /** 'all' (default), 'high', 'mid' or 'long'. */
71
+ category?: EdgeShotLocationCategory;
72
+ }
18
73
  /**
19
74
  * Get NHL EDGE skater detail statistics for a specific player.
20
75
  *
@@ -153,6 +208,133 @@ export declare function teamShotSpeedDetail(ctx: Context, params: EdgeTeamParams
153
208
  * @example await client.edge.teamSkatingSpeedDetail({ teamId: 10 })
154
209
  */
155
210
  export declare function teamSkatingSpeedDetail(ctx: Context, params: EdgeTeamParams): Promise<TeamSkatingSpeedDetail>;
211
+ /**
212
+ * Get the NHL EDGE top 10 skaters by skating distance.
213
+ *
214
+ * @param params.positions 'all' (default), 'forwards' or 'defense'
215
+ * @param params.strength 'all' (default), 'es', 'pp' or 'pk'
216
+ * @param params.sortBy 'total', 'per-60', 'max-game' or 'max-period'
217
+ * @example https://api-web.nhle.com/v1/edge/skater-distance-top-10/all/all/total/20252026/2
218
+ */
219
+ export declare function skaterDistanceTop10(ctx: Context, { positions, strength, sortBy, ...params }: EdgeStrengthTop10Params<EdgeSkatingDistanceSortBy>): Promise<SkaterDistanceTop10Row[]>;
220
+ /**
221
+ * Get the NHL EDGE top 10 skaters by skating speed.
222
+ *
223
+ * @param params.positions 'all' (default), 'forwards' or 'defense'
224
+ * @param params.sortBy 'max', 'over-22', '20-22' or '18-20' (bursts in mph)
225
+ * @example https://api-web.nhle.com/v1/edge/skater-speed-top-10/all/max/20252026/2
226
+ */
227
+ export declare function skaterSpeedTop10(ctx: Context, { positions, sortBy, ...params }: EdgePositionTop10Params<EdgeSkatingSpeedSortBy>): Promise<SkaterSpeedTop10Row[]>;
228
+ /**
229
+ * Get the NHL EDGE top 10 skaters by zone time.
230
+ *
231
+ * @param params.positions 'all' (default), 'forwards' or 'defense'
232
+ * @param params.strength 'all' (default), 'es', 'pp' or 'pk'
233
+ * @param params.sortBy Zone: 'offensive', 'neutral' or 'defensive'. See `EdgeZones`.
234
+ * @example https://api-web.nhle.com/v1/edge/skater-zone-time-top-10/all/all/offensive/20252026/2
235
+ */
236
+ export declare function skaterZoneTimeTop10(ctx: Context, { positions, strength, sortBy, ...params }: EdgeStrengthTop10Params<EdgeZone>): Promise<SkaterZoneTimeTop10Row[]>;
237
+ /**
238
+ * Get the NHL EDGE top 10 skaters by shot speed.
239
+ *
240
+ * @param params.positions 'all' (default), 'forwards' or 'defense'
241
+ * @param params.sortBy 'max', 'over-100', '90-99', '80-89' or '70-79' (attempts in mph)
242
+ * @example https://api-web.nhle.com/v1/edge/skater-shot-speed-top-10/all/max/20252026/2
243
+ */
244
+ export declare function skaterShotSpeedTop10(ctx: Context, { positions, sortBy, ...params }: EdgePositionTop10Params<EdgeShotSpeedSortBy>): Promise<SkaterShotSpeedTop10Row[]>;
245
+ /**
246
+ * Get the NHL EDGE top 10 skaters by shot location. `sortBy` comes before
247
+ * `category` in the URL (the NHL-API-Reference has them the other way round,
248
+ * which 404s).
249
+ *
250
+ * @param params.positions 'all' (default), 'forwards' or 'defense'. 'F' / 'D' are a 404 here.
251
+ * @param params.sortBy 'sog', 'goals' or 'shooting-pctg'
252
+ * @param params.category 'all' (default), 'high', 'mid' or 'long'
253
+ * @example https://api-web.nhle.com/v1/edge/skater-shot-location-top-10/all/sog/all/20252026/2
254
+ */
255
+ export declare function skaterShotLocationTop10(ctx: Context, { positions, sortBy, category, ...params }: EdgeShotLocationTop10Params): Promise<SkaterShotLocationTop10Row[]>;
256
+ /**
257
+ * Get the NHL EDGE top 10 goalies by 5v5 performance.
258
+ *
259
+ * @param params.sortBy 'save-pctg', 'save-pctg-close', 'shots' or 'shots-per-60'
260
+ * @example https://api-web.nhle.com/v1/edge/goalie-5v5-top-10/save-pctg/20252026/2
261
+ */
262
+ export declare function goalie5v5Top10(ctx: Context, { sortBy, ...params }: EdgeTop10Params<EdgeGoalie5v5SortBy>): Promise<Goalie5v5Top10Row[]>;
263
+ /**
264
+ * Get the NHL EDGE top 10 goalies by shot location.
265
+ *
266
+ * @param params.sortBy 'save-pctg', 'saves', 'goals-against' or 'shots-against'
267
+ * @param params.category 'all' (default), 'high', 'mid' or 'long'
268
+ * @example https://api-web.nhle.com/v1/edge/goalie-shot-location-top-10/save-pctg/all/20252026/2
269
+ */
270
+ export declare function goalieShotLocationTop10(ctx: Context, { sortBy, category, ...params }: EdgeGoalieShotLocationTop10Params): Promise<GoalieShotLocationTop10Row[]>;
271
+ /**
272
+ * Get the NHL EDGE top 10 goalies by games above a .900 save percentage.
273
+ *
274
+ * @param params.sortBy 'games' (count) or 'pctg' (share of games played)
275
+ * @example https://api-web.nhle.com/v1/edge/goalie-edge-save-pctg-top-10/games/20252026/2
276
+ */
277
+ export declare function goalieSavePercentageTop10(ctx: Context, { sortBy, ...params }: EdgeTop10Params<EdgeGoalieSavePercentageSortBy>): Promise<GoalieSavePercentageTop10Row[]>;
278
+ /**
279
+ * Get the NHL EDGE top 10 teams by skating distance.
280
+ *
281
+ * @param params.positions 'all' (default), 'forwards' or 'defense'
282
+ * @param params.strength 'all' (default), 'es', 'pp' or 'pk'
283
+ * @param params.sortBy 'total', 'per-60', 'max-game' or 'max-period'
284
+ * @example https://api-web.nhle.com/v1/edge/team-skating-distance-top-10/all/all/total/20252026/2
285
+ */
286
+ export declare function teamSkatingDistanceTop10(ctx: Context, { positions, strength, sortBy, ...params }: EdgeStrengthTop10Params<EdgeSkatingDistanceSortBy>): Promise<TeamSkatingDistanceTop10Row[]>;
287
+ /**
288
+ * Get the NHL EDGE top 10 teams by skating speed.
289
+ *
290
+ * @param params.positions 'all' (default), 'forwards' or 'defense'
291
+ * @param params.sortBy 'max', 'over-22', '20-22' or '18-20' (bursts in mph)
292
+ * @example https://api-web.nhle.com/v1/edge/team-skating-speed-top-10/all/max/20252026/2
293
+ */
294
+ export declare function teamSkatingSpeedTop10(ctx: Context, { positions, sortBy, ...params }: EdgePositionTop10Params<EdgeSkatingSpeedSortBy>): Promise<TeamSkatingSpeedTop10Row[]>;
295
+ /**
296
+ * Get the NHL EDGE top 10 teams by zone time. There is no `positions` slot.
297
+ *
298
+ * @param params.strength 'all' (default), 'es', 'pp' or 'pk'
299
+ * @param params.sortBy Zone: 'offensive', 'neutral' or 'defensive'. See `EdgeZones`.
300
+ * @example https://api-web.nhle.com/v1/edge/team-zone-time-top-10/es/offensive/20242025/2
301
+ */
302
+ export declare function teamZoneTimeTop10(ctx: Context, { strength, sortBy, ...params }: EdgeTeamZoneTimeTop10Params): Promise<TeamZoneTimeTop10Row[]>;
303
+ /**
304
+ * Get the NHL EDGE top 10 teams by shot speed.
305
+ *
306
+ * @param params.positions 'all' (default), 'forwards' or 'defense'
307
+ * @param params.sortBy 'max', 'over-100', '90-99', '80-89' or '70-79' (attempts in mph)
308
+ * @example https://api-web.nhle.com/v1/edge/team-shot-speed-top-10/all/max/20252026/2
309
+ */
310
+ export declare function teamShotSpeedTop10(ctx: Context, { positions, sortBy, ...params }: EdgePositionTop10Params<EdgeShotSpeedSortBy>): Promise<TeamShotSpeedTop10Row[]>;
311
+ /**
312
+ * Get the NHL EDGE top 10 teams by shot location. `sortBy` comes before
313
+ * `category` in the URL (the NHL-API-Reference has them the other way round,
314
+ * which 404s).
315
+ *
316
+ * @param params.positions 'all' (default), 'forwards' or 'defense'. 'F' / 'D' are a 404 here.
317
+ * @param params.sortBy 'sog', 'goals' or 'shooting-pctg'
318
+ * @param params.category 'all' (default), 'high', 'mid' or 'long'
319
+ * @example https://api-web.nhle.com/v1/edge/team-shot-location-top-10/all/sog/all/20252026/2
320
+ */
321
+ export declare function teamShotLocationTop10(ctx: Context, { positions, sortBy, category, ...params }: EdgeShotLocationTop10Params): Promise<TeamShotLocationTop10Row[]>;
322
+ /**
323
+ * Get the NHL EDGE comparison statistics for a specific team.
324
+ *
325
+ * @param params.teamId NHL team id, e.g. 10
326
+ * @example await client.edge.teamComparison({ teamId: 10 })
327
+ */
328
+ export declare function teamComparison(ctx: Context, params: EdgeTeamParams): Promise<TeamComparison>;
329
+ /**
330
+ * Get the NHL EDGE "by the numbers" league highlights. Without a season this
331
+ * is the latest game night (`games`, `gameDate` and the nightly leaders);
332
+ * with a season it is the season bests (hardest shot, top speed, longest
333
+ * distance in a game).
334
+ *
335
+ * @example https://api-web.nhle.com/v1/edge/by-the-numbers/now
336
+ */
337
+ export declare function byTheNumbers(ctx: Context, params?: EdgeSeasonParams): Promise<ByTheNumbers>;
156
338
  export declare const edgeApi: {
157
339
  readonly skaterDetail: typeof skaterDetail;
158
340
  readonly skaterShotSpeedDetail: typeof skaterShotSpeedDetail;
@@ -177,4 +359,19 @@ export declare const edgeApi: {
177
359
  readonly teamLanding: typeof teamLanding;
178
360
  readonly teamShotSpeedDetail: typeof teamShotSpeedDetail;
179
361
  readonly teamSkatingSpeedDetail: typeof teamSkatingSpeedDetail;
362
+ readonly skaterDistanceTop10: typeof skaterDistanceTop10;
363
+ readonly skaterSpeedTop10: typeof skaterSpeedTop10;
364
+ readonly skaterZoneTimeTop10: typeof skaterZoneTimeTop10;
365
+ readonly skaterShotSpeedTop10: typeof skaterShotSpeedTop10;
366
+ readonly skaterShotLocationTop10: typeof skaterShotLocationTop10;
367
+ readonly goalie5v5Top10: typeof goalie5v5Top10;
368
+ readonly goalieShotLocationTop10: typeof goalieShotLocationTop10;
369
+ readonly goalieSavePercentageTop10: typeof goalieSavePercentageTop10;
370
+ readonly teamSkatingDistanceTop10: typeof teamSkatingDistanceTop10;
371
+ readonly teamSkatingSpeedTop10: typeof teamSkatingSpeedTop10;
372
+ readonly teamZoneTimeTop10: typeof teamZoneTimeTop10;
373
+ readonly teamShotSpeedTop10: typeof teamShotSpeedTop10;
374
+ readonly teamShotLocationTop10: typeof teamShotLocationTop10;
375
+ readonly teamComparison: typeof teamComparison;
376
+ readonly byTheNumbers: typeof byTheNumbers;
180
377
  };