nhle-api 0.5.4 → 0.7.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.
package/lib/index.d.cts CHANGED
@@ -2,132 +2,10 @@ import * as arktype_internal_variants_number_ts from 'arktype/internal/variants/
2
2
  import * as arktype_internal_variants_string_ts from 'arktype/internal/variants/string.ts';
3
3
  import * as arktype_internal_variants_object_ts from 'arktype/internal/variants/object.ts';
4
4
  import * as arktype from 'arktype';
5
+ import { Out } from 'arktype';
5
6
  import * as arktype_internal_attributes_ts from 'arktype/internal/attributes.ts';
6
-
7
- /** Categories for save location top-10 list */
8
- declare const SaveLocationCategoryEnum: {
9
- /** Save Percentage */
10
- readonly 'SV%': "save-pctg";
11
- /** Saves */
12
- readonly SV: "saves";
13
- /** Shots Against */
14
- readonly SA: "shots-against";
15
- /** Goals Against */
16
- readonly GA: "goals-against";
17
- };
18
- /** Sort options for shot location top-10 list */
19
- declare const ShotLocationSortEnum: {
20
- /** All shot locations */
21
- readonly ALL: "all";
22
- /** High-danger (i.e. close-range) shot locations */
23
- readonly HIGH: "high";
24
- /** Mid-range shot locations */
25
- readonly MID: "mid";
26
- /** Long-range shot locations */
27
- readonly LONG: "long";
28
- };
29
- /** Alias for ShotLocationSortEnum */
30
- declare const SaveLocationSortEnum: {
31
- /** All shot locations */
32
- readonly ALL: "all";
33
- /** High-danger (i.e. close-range) shot locations */
34
- readonly HIGH: "high";
35
- /** Mid-range shot locations */
36
- readonly MID: "mid";
37
- /** Long-range shot locations */
38
- readonly LONG: "long";
39
- };
40
- /** Sort options for 5v5 save percentage top-10 list */
41
- declare const SavePercentage5v5SortEnum: {
42
- /**5v5 Save %: The percentage of shots a goalie stops at even strength (5-on-5). */
43
- readonly '5v5-SV%': "save-pctg";
44
- /**5v5 Save % in Close Situations: A “close situation” is the time during which a game is tied in the first or second period, or within one goal in the third period. This stats helps how goalies perform in high-pressure situations.*/
45
- readonly '5v5-SV%-Close': "save-pctg-close";
46
- /**5v5 Shots Against: The total number of shots a goalie faces at even strength (5-on-5).*/
47
- readonly '5v5-SA': "shots";
48
- /**5v5 Shots Against per 60 Minutes: The total number of shots a goalie faces at even strength (5-on-5) normalized to a 60-minute game. */
49
- readonly '5v5-SA/60': "shots-per-60";
50
- };
51
- /** Sort options for save percentage top-10 list */
52
- declare const SavePercentageSortEnum: {
53
- /** Starts above .900 */
54
- readonly GAMES: "games";
55
- /** Percentage of starts above .900 */
56
- readonly PCTG: "pctg";
57
- };
58
- /** Filter options for player positions */
59
- declare const PositionFilterEnum: {
60
- /** Center */
61
- readonly ALL: "all";
62
- /** Left Wing */
63
- readonly FWD: "forwards";
64
- /** Right Wing */
65
- readonly DEF: "defense";
66
- };
67
- /** Categories for skater strength */
68
- declare const SkatersStrengthEnum: {
69
- /** All strengths */
70
- readonly ALL: "all";
71
- /** Even strength */
72
- readonly ES: "es";
73
- /** Power play */
74
- readonly PP: "pp";
75
- /** Short-handed */
76
- readonly PK: "pk";
77
- };
78
- /** Sorting options for shot speed top-10 list */
79
- declare const ShotSpeedSortEnum: {
80
- /** Hardest shot recorded by player */
81
- readonly MAX: "max";
82
- /** Shots over 100 mph */
83
- readonly 'OVER-100': "over-100";
84
- /** Shots between 90 and 99 mph */
85
- readonly '90-99': "90-99";
86
- /** Shots between 80 and 89 mph */
87
- readonly '80-89': "80-89";
88
- /** Shots between 70 and 79 mph */
89
- readonly '70-79': "70-79";
90
- };
91
- /** Sorting options for skating speed top-10 list */
92
- declare const SkatingSpeedSortEnum: {
93
- /** Fastest skating speed recorded by player */
94
- readonly TOP: "max";
95
- /** Speed bursts recorded over 22 mph */
96
- readonly 'OVER-22': "over-22";
97
- /** Speed bursts recorded between 20 and 22 mph */
98
- readonly '20-22': "20-22";
99
- /** Speed bursts recorded between 18 and 20 mph */
100
- readonly '18-20': "18-20";
101
- };
102
- /** Sorting options for skating distance top-10 list */
103
- declare const SkatingDistanceSortEnum: {
104
- /** Total distance skated */
105
- TOTAL: string;
106
- /** Average distance skated per 60 minutes */
107
- 'PER-60': string;
108
- /** Maximum distance skated in a single period */
109
- 'MAX-PERIOD': string;
110
- /** Maximum distance skated in a single game */
111
- 'MAX-GAME': string;
112
- };
113
- /** Categories for shot location top-10 list */
114
- declare const ShotLocationCategoryEnum: {
115
- /** Total shots on goal */
116
- readonly SOG: "sog";
117
- /** Total goals */
118
- readonly G: "goals";
119
- /** Shooting percentage */
120
- readonly 'SH%': "shooting-pctg";
121
- };
122
- /** Sorting options for zone time top-10 lists. */
123
- declare const ZoneTimeSortEnum: {
124
- /** Percentage of time spent in the offensive zone */
125
- readonly OZ: "offensive";
126
- /** Percentage of time spent in the defensive zone */
127
- readonly DZ: "defensive";
128
- /** Percentage of time spent in the neutral zone */
129
- readonly NZ: "neutral";
130
- };
7
+ import { C as CayenneQueryBuilder } from './nhl-B7Hg7iMB.cjs';
8
+ export { a as CayenneCondition, c as CayenneExpression, d as CayenneGroup, n as NHL, b as buildCayenneExp, e as createCayenneQuery } from './nhl-B7Hg7iMB.cjs';
131
9
 
132
10
  /**
133
11
  * Error handling module for NHL Sports Data API wrapper
@@ -150,6 +28,14 @@ declare const ErrorCategory: {
150
28
  readonly VALIDATION: "VALIDATION";
151
29
  };
152
30
  type ErrorCategory = (typeof ErrorCategory)[keyof typeof ErrorCategory];
31
+ declare const LogLevel$1: {
32
+ NONE: number;
33
+ ERROR: number;
34
+ WARN: number;
35
+ INFO: number;
36
+ DEBUG: number;
37
+ };
38
+ type LogLevel$1 = (typeof LogLevel$1)[keyof typeof LogLevel$1];
153
39
  interface ErrorContext {
154
40
  /** HTTP status code if applicable */
155
41
  statusCode?: number;
@@ -168,6 +54,14 @@ interface ErrorContext {
168
54
  /** Additional metadata */
169
55
  metadata?: Record<string, unknown>;
170
56
  }
57
+ interface ErrorConfig {
58
+ /** Logging level for error output */
59
+ logLevel?: LogLevel$1;
60
+ /** Custom logger function */
61
+ logger?: (level: LogLevel$1, message: string, context?: ErrorContext) => void;
62
+ /** Whether to include stack traces */
63
+ includeStack?: boolean;
64
+ }
171
65
  /**
172
66
  * Base error class for all NHL API errors
173
67
  */
@@ -186,495 +80,3020 @@ declare class NHLError extends Error {
186
80
  context: ErrorContext;
187
81
  };
188
82
  }
189
-
190
- declare const Year$1: arktype.BaseType<number | ((In: string) => arktype_internal_attributes_ts.To<number>), {}>;
191
- declare const NHLMonth$1: arktype_internal_variants_object_ts.ObjectType<(In: string | Date) => arktype.Out<string>, {}>;
192
- declare const NHLDate$1: arktype_internal_variants_object_ts.ObjectType<(In: string | Date) => arktype.Out<string>, {}>;
193
- declare const Season$1: arktype_internal_variants_object_ts.ObjectType<(In: string | number) => arktype.Out<string>, {}>;
194
- declare const TeamAbbrev$1: arktype_internal_variants_string_ts.StringType<"ANA" | "BOS" | "BUF" | "CGY" | "CAR" | "CHI" | "COL" | "CBJ" | "DAL" | "DET" | "EDM" | "FLA" | "LAK" | "MIN" | "MTL" | "NJD" | "NSH" | "NYI" | "NYR" | "OTT" | "PHI" | "PIT" | "SJS" | "SEA" | "STL" | "TBL" | "TOR" | "UTA" | "VAN" | "VGK" | "WPG" | "WSH" | "AFM" | "ARI" | "ATL" | "BRK" | "CGS" | "CLE" | "CLR" | "DCG" | "DFL" | "HAM" | "HFD" | "KCS" | "MMR" | "MNS" | "MWN" | "NYA" | "OAK" | "PHX" | "PIR" | "QBD" | "QUA" | "QUE" | "SEN" | "SLE" | "TAN" | "TSP" | "WIN", {}>;
195
- declare const TeamId$1: arktype_internal_variants_number_ts.NumberType<1 | 10 | 2 | 3 | 4 | 24 | 6 | 7 | 20 | 12 | 16 | 21 | 29 | 25 | 17 | 22 | 13 | 26 | 30 | 8 | 18 | 9 | 5 | 28 | 55 | 19 | 14 | 59 | 23 | 54 | 52 | 15 | 47 | 53 | 11 | 51 | 56 | 49 | 35 | 40 | 50 | 37 | 34 | 48 | 43 | 31 | 41 | 44 | 46 | 27 | 38 | 42 | 39 | 32 | 36 | 45 | 57 | 58 | 33, {}>;
196
- declare const GameType$1: arktype.BaseType<1 | 2 | 3 | 4 | 19 | ((In: "REG" | "PRE" | "POST" | "ASG" | "INTL") => arktype.Out<1 | 2 | 3 | 4 | 19>), {}>;
197
- declare const GameNumber$1: arktype_internal_variants_object_ts.ObjectType<(In: string | number) => arktype.Out<string>, {}>;
198
- declare const DraftRound$1: arktype_internal_variants_object_ts.ObjectType<(In: string | number) => arktype.Out<string>, {}>;
199
- declare const EventId$1: arktype.BaseType<number | ((In: string) => arktype_internal_attributes_ts.To<number>), {}>;
200
- declare const GameId$1: arktype.BaseType<number | ((In: string) => arktype_internal_attributes_ts.To<number>), {}>;
201
- declare const SeriesLetter$2: arktype_internal_variants_string_ts.StringType<"A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O", {}>;
202
- declare const GameState$2: arktype_internal_variants_string_ts.StringType<"FUT" | "LIV" | "FIN", {}>;
203
- declare const CountryCode$2: arktype_internal_variants_object_ts.ObjectType<(In: string) => arktype.Out<string>, {}>;
204
- declare const PostalCode$1: arktype_internal_variants_string_ts.StringType<string, {}>;
205
- declare const PlayerId$1: arktype_internal_variants_object_ts.ObjectType<(In: string | number) => arktype.Out<string>, {}>;
206
-
207
83
  /**
208
- * Represents a valid NHL year (e.g., 2023, 2024, ...)
84
+ * Network-level errors (timeouts, connection failures)
209
85
  */
210
- type Year = typeof Year$1.inferIn;
86
+ declare class NetworkError extends NHLError {
87
+ constructor(message: string, context?: ErrorContext);
88
+ }
211
89
  /**
212
- * Represents an NHL season in the format YYYYYYYY (e.g., 20232024)
90
+ * HTTP 4xx client errors
213
91
  */
214
- type Season = typeof Season$1.inferIn;
92
+ declare class ClientError extends NHLError {
93
+ constructor(message: string, context?: ErrorContext);
94
+ }
215
95
  /**
216
- * Represents a valid NHL game type (e.g. REG, PRE, POST)
96
+ * HTTP 404 resource not found
217
97
  */
218
- type GameType = typeof GameType$1.inferIn;
98
+ declare class NotFoundError extends ClientError {
99
+ constructor(message?: string, context?: ErrorContext);
100
+ }
219
101
  /**
220
- * Represents an NHL game ID with regex /\d{10}/
221
- * Breakdown of the ID: (YYYYTTNNNN)
222
- * - First 4 digits: Year of the game (YYYY)
223
- * - Next 2 digits: Game type (TT)(01 for preseason, 02 for regular
224
- * season, 03 for playoffs)
225
- * - Next 4 digits: Game number of the season (NNNN)
102
+ * HTTP 5xx server errors
226
103
  */
227
- type GameId = typeof GameId$1.inferIn;
104
+ declare class ServerError extends NHLError {
105
+ constructor(message: string, context?: ErrorContext);
106
+ }
228
107
  /**
229
- * Represents a valid NHL team abbreviation (e.g., NYR, MTL, ...)
108
+ * HTTP 429 rate limit errors
230
109
  */
231
- type TeamAbbrev = typeof TeamAbbrev$1.inferIn | (string & {});
110
+ declare class RateLimitError extends NHLError {
111
+ readonly retryAfter?: number;
112
+ constructor(message?: string, context?: ErrorContext, retryAfter?: number);
113
+ }
232
114
  /**
233
- * Represents a valid NHL team ID
115
+ * API returned 200 but with error message in JSON payload
234
116
  */
235
- type TeamId = typeof TeamId$1.inferIn | (number & {});
117
+ declare class APIError extends NHLError {
118
+ constructor(message: string, context?: ErrorContext);
119
+ }
236
120
  /**
237
- * Represents a valid NHL game number
121
+ * Response parsing or validation failures
238
122
  */
239
- type GameNumber = typeof GameNumber$1.inferIn;
123
+ declare class ParseError extends NHLError {
124
+ constructor(message: string, context?: ErrorContext);
125
+ }
240
126
  /**
241
- * Represents a valid NHL game state
127
+ * Invalid user input or configuration
242
128
  */
243
- type GameState$1 = typeof GameState$2.inferIn;
129
+ declare class ValidationError extends NHLError {
130
+ constructor(message: string, context?: ErrorContext);
131
+ }
244
132
  /**
245
- * Represents a valid draft round (1-7)
133
+ * Error handler utility class
246
134
  */
247
- type DraftRound = typeof DraftRound$1.inferIn;
135
+ declare class ErrorHandler {
136
+ private overrides;
137
+ /**
138
+ * @param config - Overrides; an unset `logLevel` follows the shared
139
+ * `config.logLevel` at log time.
140
+ */
141
+ constructor(config?: ErrorConfig);
142
+ private get config();
143
+ /**
144
+ * Default console-based logger
145
+ */
146
+ private defaultLogger;
147
+ /**
148
+ * Log an error based on configuration
149
+ */
150
+ log(error: NHLError): void;
151
+ /**
152
+ * Determine log level based on error category
153
+ */
154
+ private getLogLevel;
155
+ /**
156
+ * Create error from HTTP response
157
+ */
158
+ fromResponse(response: Response, context?: Omit<ErrorContext, 'statusCode'>): Promise<NHLError>;
159
+ /**
160
+ * Create error from caught exception
161
+ */
162
+ fromError(error: unknown, context?: ErrorContext): NHLError;
163
+ /**
164
+ * Update configuration
165
+ */
166
+ configure(config: Partial<ErrorConfig>): void;
167
+ }
168
+
248
169
  /**
249
- * Represents a valid NHL event ID
170
+ * NHL API Client Type Definitions
250
171
  */
251
- type EventId = typeof EventId$1.inferIn;
172
+
252
173
  /**
253
- * Represents a valid NHL date in the format YYYY-MM-DD
174
+ * Configuration options for the NHL API client
254
175
  */
255
- type NHLDate = typeof NHLDate$1.inferIn;
176
+ interface NHLClientConfig {
177
+ /**
178
+ * Base URL for the NHL API
179
+ * @default 'https://api-web.nhle.com/v1'
180
+ */
181
+ baseUrl?: string;
182
+ /**
183
+ * Request timeout in milliseconds
184
+ * @default 5000 (5 seconds)
185
+ */
186
+ timeout?: number;
187
+ /**
188
+ * Additional headers to include with every request
189
+ */
190
+ headers?: Record<string, string>;
191
+ /**
192
+ * Language code for localized responses
193
+ * @default 'en' (English)
194
+ */
195
+ language?: 'en' | 'fr';
196
+ }
197
+ type APIResult<T> = {
198
+ success: true;
199
+ data: T;
200
+ } | {
201
+ success: false;
202
+ error: NHLError;
203
+ };
204
+
256
205
  /**
257
- * Represents a valid NHL month in the format YYYY-MM
206
+ * Common types used in Gamecenter API responses
258
207
  */
259
- type NHLMonth = typeof NHLMonth$1.inferIn;
208
+ /** The current state of the game. */
209
+ type GameState$2 = 'OFF' | 'FUT' | 'LIVE' | 'PRE' | 'CRIT' | 'FINAL';
210
+ /** The current state of the game. */
211
+ type GameScheduleState = 'OK' | 'TBD' | 'CNCL' | (string & {});
212
+ /** The type of period in the game. */
213
+ type PeriodType = 'REG' | 'OT' | 'SO';
214
+ /** Abbreviated day of the week. (MON = Monday, TUE = Tuesday ...) */
215
+ type DayAbbrev = 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT' | 'SUN';
216
+ /** The type of penalty. (MIN = Minor, BEN = Bench, MAJ = Major ...) */
217
+ type PenaltyTypeCode = 'MIN' | 'BEN' | 'MAJ' | (string & {});
218
+ /** The market for this broadcast. (H = Home, A = Away, N = National, S = Satellite Radio) */
219
+ type Market = 'H' | 'A' | 'N' | 'S';
220
+ /** The country code for this broadcast. (CA = Canada, US = United States) */
221
+ type CountryCode$2 = 'CA' | 'US';
222
+ /** The position code for a player. (C = Center, L = Left Wing, R = Right Wing, D = Defenseman, G = Goalie) */
223
+ type PositionCode = 'C' | 'L' | 'R' | 'D' | 'G';
260
224
  /**
261
- * Represents a valid NHL series letter (A-O)
225
+ * The position code for a draft prospect. The draft endpoints spell
226
+ * wingers `LW`/`RW` and may list a generic forward (`F`) or two
227
+ * positions (`C/LW`).
262
228
  */
263
- type SeriesLetter$1 = typeof SeriesLetter$2.inferIn;
229
+ type DraftPositionCode = 'C' | 'LW' | 'RW' | 'D' | 'G' | 'F' | 'C/LW' | 'C/RW' | 'LW/RW';
230
+ /** Player's shooting/catching handedness. (L = Left, R = Right) */
231
+ type ShootsCatches = 'L' | 'R';
232
+ type HexColorCode = `#${string}`;
233
+ type UTCOffset = `+${number}:${number}` | `-${number}:${number}`;
234
+ type GoalModifier = 'none' | 'empty-net' | 'awarded-empty-net';
235
+ type DefendingSide = 'left' | 'right';
236
+ type Strength = 'ev' | 'pp' | 'sh';
237
+ type ZoneCode = 'N' | 'D' | 'O';
238
+ type ShotType = 'backhand' | 'bat' | 'between-legs' | 'deflected' | 'poke' | 'slap' | 'snap' | 'tip-in' | 'wrap-around' | 'wrist' | (string & {});
239
+ type PenaltyDescKey = 'tripping' | 'hooking' | 'interference' | 'high-sticking' | 'roughing' | 'unsportsmanlike-conduct' | 'slashing' | 'delaying-game-puck-over-glass' | 'holding' | 'holding-the-stick' | 'too-many-men-on-the-ice' | 'fighting' | 'minor' | 'cross-checking' | (string & {});
240
+ type Reason = 'blocked' | 'failed-bank-attempt' | 'wide-right' | 'goalie-stopped-after-sog' | 'offside' | 'teammate-blocked' | 'icing' | 'puck-in-netting' | 'wide-left' | 'high-and-wide-left' | 'puck-frozen' | 'above-crossbar' | 'tv-timeout' | 'hand-pass' | 'skater-puck-frozen' | 'high-stick' | 'high-and-wide-right' | 'hit-crossbar' | 'puck-in-benches' | 'hit-right-post' | 'short' | 'referee-or-linesman' | 'puck-in-crowd' | 'hit-left-post' | 'player-equipment' | 'net-dislodged-defensive-skater' | 'home-timeout' | 'chlg-hm-goal-interference' | 'video-review' | 'chlg-league-missed-stoppage' | 'visitor-timeout' | 'official-injury' | (string & {});
241
+ type EventTypeDescKey = 'period-start' | 'faceoff' | 'blocked-shot' | 'goal' | 'hit' | 'giveaway' | 'missed-shot' | 'shot-on-goal' | 'stoppage' | 'takeaway' | 'penalty' | 'period-end' | 'delayed-penalty' | 'game-end' | (string & {});
242
+ /** An object containing a default string an optional localized strings. */
243
+ interface LocalizedText {
244
+ /** Default */
245
+ default: string;
246
+ /** French */
247
+ fr?: string;
248
+ /** Czech */
249
+ cs?: string;
250
+ /** German */
251
+ de?: string;
252
+ /** Spanish */
253
+ es?: string;
254
+ /** Finnish */
255
+ fi?: string;
256
+ /** Slovak */
257
+ sk?: string;
258
+ /** Swedish */
259
+ sv?: string;
260
+ }
261
+ interface TvBroadcast {
262
+ id: number;
263
+ market: Market;
264
+ countryCode: CountryCode$2;
265
+ network: string;
266
+ sequenceNumber: number;
267
+ }
268
+
264
269
  /**
265
- * Represents the playoff rounds in an NHL season (1-4)
270
+ * Response types for the NHL Edge advanced stats endpoints
271
+ * (api-web.nhle.com/v1/edge/*), exposed as the `adv` namespace.
272
+ *
273
+ * Generated from live responses for two seasons (regular season and
274
+ * playoffs) and kept in step by the API drift check.
275
+ */
276
+
277
+ /** A measurement in both unit systems (mph/km/h, feet/metres or miles/km) */
278
+ interface EdgeMeasurement {
279
+ imperial: number;
280
+ metric: number;
281
+ }
282
+ /** A season with Edge data and the game types it covers */
283
+ interface EdgeSeason {
284
+ id: number;
285
+ gameTypes: number[];
286
+ }
287
+ /** The game a stat was recorded in, shown as an overlay on nhl.com/edge */
288
+ interface EdgeOverlay {
289
+ player?: {
290
+ firstName: LocalizedText;
291
+ lastName: LocalizedText;
292
+ };
293
+ gameDate: string;
294
+ awayTeam: {
295
+ abbrev: string;
296
+ score: number;
297
+ };
298
+ homeTeam: {
299
+ abbrev: string;
300
+ score: number;
301
+ };
302
+ gameOutcome: {
303
+ lastPeriodType: string;
304
+ otPeriods?: number;
305
+ };
306
+ periodDescriptor: EdgePeriodDescriptor;
307
+ timeInPeriod?: string;
308
+ gameType: number;
309
+ }
310
+ /** Period of a game event */
311
+ interface EdgePeriodDescriptor {
312
+ maxRegulationPeriods: number;
313
+ number: number;
314
+ periodType: string;
315
+ }
316
+ /** Team logo URLs for light and dark backgrounds */
317
+ interface EdgeTeamLogos {
318
+ light: string;
319
+ dark: string;
320
+ }
321
+ /**
322
+ * A team as Edge responses nest it. Detail and landing endpoints add
323
+ * the optional fields; game rows carry only names, abbrev and logos.
324
+ */
325
+ interface EdgeTeam {
326
+ commonName: LocalizedText;
327
+ placeNameWithPreposition: LocalizedText;
328
+ abbrev?: string;
329
+ teamLogo: EdgeTeamLogos;
330
+ id?: number;
331
+ slug?: string;
332
+ conference?: string;
333
+ division?: string;
334
+ wins?: number;
335
+ losses?: number;
336
+ otLosses?: number;
337
+ gamesPlayed?: number;
338
+ points?: number;
339
+ }
340
+ /**
341
+ * A player as Edge responses nest it. Detail endpoints add season totals
342
+ * (skater or goalie); top-10 rows carry only names, slug and team.
343
+ */
344
+ interface EdgePlayer {
345
+ birthDate?: string;
346
+ id?: number;
347
+ firstName: LocalizedText;
348
+ lastName: LocalizedText;
349
+ sweaterNumber?: number;
350
+ position?: string;
351
+ slug: string;
352
+ headshot?: string;
353
+ shootsCatches?: string;
354
+ team?: EdgeTeam;
355
+ goals?: number;
356
+ assists?: number;
357
+ points?: number;
358
+ gamesPlayed?: number;
359
+ wins?: number;
360
+ losses?: number;
361
+ overtimeLosses?: number;
362
+ goalsAgainstAvg?: number;
363
+ savePctg?: number;
364
+ }
365
+ /** Response of `adv.byTheNumbers` */
366
+ interface EdgeByTheNumbers {
367
+ games: number;
368
+ gameDate: string;
369
+ hardestShotSkater: {
370
+ player: EdgePlayer;
371
+ overlay: EdgeOverlay;
372
+ shotSpeed: EdgeMeasurement;
373
+ };
374
+ maxSkatingSpeedSkater: {
375
+ player: EdgePlayer;
376
+ overlay: EdgeOverlay;
377
+ skatingSpeed: EdgeMeasurement;
378
+ };
379
+ totalDistanceSkatedSkater: {
380
+ player: EdgePlayer;
381
+ distanceSkated: {
382
+ imperial: number;
383
+ metric: number;
384
+ overlay: EdgeOverlay;
385
+ };
386
+ };
387
+ totalDistanceSkatedTeam: {
388
+ team: EdgeTeam;
389
+ game: {
390
+ gameCenterLink: string;
391
+ gameDate: string;
392
+ isHomeTeam: boolean;
393
+ homeTeam: EdgeTeam;
394
+ awayTeam: EdgeTeam;
395
+ distanceSkated: EdgeMeasurement;
396
+ };
397
+ topFiveSkaters: {
398
+ gameCenterLink: string;
399
+ gameDate: string;
400
+ playerOnHomeTeam: boolean;
401
+ distanceSkated: EdgeMeasurement;
402
+ toi: number;
403
+ homeTeam: {
404
+ id: number;
405
+ commonName: LocalizedText;
406
+ placeNameWithPreposition: LocalizedText;
407
+ abbrev: string;
408
+ slug: string;
409
+ teamLogo: EdgeTeamLogos;
410
+ conference: string;
411
+ division: string;
412
+ };
413
+ awayTeam: {
414
+ id: number;
415
+ commonName: LocalizedText;
416
+ placeNameWithPreposition: LocalizedText;
417
+ abbrev: string;
418
+ slug: string;
419
+ teamLogo: EdgeTeamLogos;
420
+ conference: string;
421
+ division: string;
422
+ };
423
+ player: {
424
+ name: LocalizedText;
425
+ };
426
+ }[];
427
+ };
428
+ totalDistanceSkatedLeague: {
429
+ distanceSkated: EdgeMeasurement;
430
+ topFiveSkaters: {
431
+ gameCenterLink: string;
432
+ gameDate: string;
433
+ playerOnHomeTeam: boolean;
434
+ distanceSkated: EdgeMeasurement;
435
+ toi: number;
436
+ homeTeam: {
437
+ id: number;
438
+ commonName: LocalizedText;
439
+ placeNameWithPreposition: LocalizedText;
440
+ abbrev: string;
441
+ slug: string;
442
+ teamLogo: EdgeTeamLogos;
443
+ conference: string;
444
+ division: string;
445
+ };
446
+ awayTeam: {
447
+ id: number;
448
+ commonName: LocalizedText;
449
+ placeNameWithPreposition: LocalizedText;
450
+ abbrev: string;
451
+ slug: string;
452
+ teamLogo: EdgeTeamLogos;
453
+ conference: string;
454
+ division: string;
455
+ };
456
+ player: {
457
+ name: LocalizedText;
458
+ };
459
+ }[];
460
+ };
461
+ sogTeam: {
462
+ team: EdgeTeam;
463
+ shots: number;
464
+ sogDetails: {
465
+ area: string;
466
+ shots: number;
467
+ }[];
468
+ };
469
+ /** Goalie with the most high-danger saves; added to the API in October 2026. */
470
+ highDangerSavesGoalie?: {
471
+ player: EdgePlayer;
472
+ saves: number;
473
+ shotLocationDetails: {
474
+ area: string;
475
+ saves: number;
476
+ }[];
477
+ };
478
+ }
479
+ /** Response of `adv.skaters.detail` */
480
+ interface EdgeSkaterDetail {
481
+ player: EdgePlayer;
482
+ seasonsWithEdgeStats: EdgeSeason[];
483
+ topShotSpeed: {
484
+ imperial: number;
485
+ metric: number;
486
+ percentile: number;
487
+ leagueAvg: EdgeMeasurement;
488
+ overlay: EdgeOverlay;
489
+ };
490
+ skatingSpeed: {
491
+ speedMax: {
492
+ imperial: number;
493
+ metric: number;
494
+ percentile: number;
495
+ leagueAvg: EdgeMeasurement;
496
+ overlay: EdgeOverlay;
497
+ };
498
+ burstsOver20: {
499
+ value: number;
500
+ percentile: number;
501
+ leagueAvg: {
502
+ value: number;
503
+ };
504
+ };
505
+ };
506
+ totalDistanceSkated: {
507
+ imperial: number;
508
+ metric: number;
509
+ percentile: number;
510
+ leagueAvg: EdgeMeasurement;
511
+ };
512
+ distanceMaxGame: {
513
+ imperial: number;
514
+ metric: number;
515
+ percentile: number;
516
+ leagueAvg: EdgeMeasurement;
517
+ overlay: EdgeOverlay;
518
+ };
519
+ sogSummary: {
520
+ locationCode: string;
521
+ shots: number;
522
+ shotsPercentile: number;
523
+ shotsLeagueAvg: number;
524
+ goals: number;
525
+ goalsPercentile: number;
526
+ goalsLeagueAvg: number;
527
+ shootingPctg: number;
528
+ shootingPctgPercentile: number;
529
+ shootingPctgLeagueAvg: number;
530
+ }[];
531
+ sogDetails: {
532
+ area: string;
533
+ shots: number;
534
+ shotsPercentile: number;
535
+ }[];
536
+ zoneTimeDetails: {
537
+ offensiveZonePctg: number;
538
+ offensiveZonePercentile: number;
539
+ offensiveZoneLeagueAvg: number;
540
+ offensiveZoneEvPctg: number;
541
+ offensiveZoneEvPercentile: number;
542
+ offensiveZoneEvLeagueAvg: number;
543
+ neutralZonePctg: number;
544
+ neutralZonePercentile: number;
545
+ neutralZoneLeagueAvg: number;
546
+ defensiveZonePctg: number;
547
+ defensiveZonePercentile: number;
548
+ defensiveZoneLeagueAvg: number;
549
+ };
550
+ }
551
+ /** Response of `adv.skaters.comparison` */
552
+ interface EdgeSkaterComparison {
553
+ player: EdgePlayer;
554
+ seasonsWithEdgeStats: EdgeSeason[];
555
+ shotSpeedDetails: {
556
+ topShotSpeed: {
557
+ imperial: number;
558
+ metric: number;
559
+ overlay: EdgeOverlay;
560
+ };
561
+ avgShotSpeed: EdgeMeasurement;
562
+ shotAttemptsOver100: number;
563
+ shotAttempts90To100: number;
564
+ shotAttempts80To90: number;
565
+ shotAttempts70To80: number;
566
+ };
567
+ skatingSpeedDetails: {
568
+ maxSkatingSpeed: {
569
+ imperial: number;
570
+ metric: number;
571
+ overlay: EdgeOverlay;
572
+ };
573
+ burstsOver22: number;
574
+ bursts20To22: number;
575
+ bursts18To20: number;
576
+ };
577
+ skatingDistanceLast10: {
578
+ gameCenterLink: string;
579
+ gameDate: string;
580
+ playerOnHomeTeam: boolean;
581
+ distanceSkated: EdgeMeasurement;
582
+ toi: number;
583
+ homeTeam: EdgeTeam;
584
+ awayTeam: EdgeTeam;
585
+ }[];
586
+ skatingDistanceDetails: {
587
+ distanceTotal: EdgeMeasurement;
588
+ distancePer60: EdgeMeasurement;
589
+ distanceMaxGame: {
590
+ imperial: number;
591
+ metric: number;
592
+ overlay: EdgeOverlay;
593
+ };
594
+ distanceMaxPeriod: {
595
+ imperial: number;
596
+ metric: number;
597
+ overlay: EdgeOverlay;
598
+ };
599
+ };
600
+ shotLocationDetails: {
601
+ area: string;
602
+ sog: number;
603
+ goals: number;
604
+ shootingPctg: number;
605
+ }[];
606
+ shotLocationTotals: {
607
+ locationCode: string;
608
+ sog: number;
609
+ goals: number;
610
+ shootingPctg: number;
611
+ }[];
612
+ zoneTimeDetails: {
613
+ offensiveZonePctg: number;
614
+ offensiveZoneLeagueAvg: number;
615
+ neutralZonePctg: number;
616
+ neutralZoneLeagueAvg: number;
617
+ defensiveZonePctg: number;
618
+ defensiveZoneLeagueAvg: number;
619
+ };
620
+ zoneStarts: {
621
+ offensiveZoneStarts: number;
622
+ neutralZoneStarts: number;
623
+ defensiveZoneStarts: number;
624
+ };
625
+ }
626
+ /** Response of `adv.skaters.leaders` */
627
+ interface EdgeSkaterLanding {
628
+ seasonsWithEdgeStats: EdgeSeason[];
629
+ leaders: {
630
+ hardestShot: {
631
+ player: EdgePlayer;
632
+ overlay: EdgeOverlay;
633
+ shotSpeed: EdgeMeasurement;
634
+ };
635
+ maxSkatingSpeed: {
636
+ player: EdgePlayer;
637
+ overlay: EdgeOverlay;
638
+ skatingSpeed: EdgeMeasurement;
639
+ };
640
+ totalDistanceSkated: {
641
+ player: EdgePlayer;
642
+ distanceSkated: EdgeMeasurement;
643
+ };
644
+ distanceMaxGame: {
645
+ player: EdgePlayer;
646
+ distanceSkated: EdgeMeasurement;
647
+ overlay: EdgeOverlay;
648
+ };
649
+ highDangerSOG: {
650
+ player: EdgePlayer;
651
+ sog: number;
652
+ shotLocationDetails: {
653
+ area: string;
654
+ sog: number;
655
+ sogPercentile: number;
656
+ }[];
657
+ };
658
+ offensiveZoneTime: {
659
+ player: EdgePlayer;
660
+ zoneTime: number;
661
+ };
662
+ defensiveZoneTime: {
663
+ player: EdgePlayer;
664
+ zoneTime: number;
665
+ };
666
+ };
667
+ }
668
+ /** Response of `adv.skaters.shotLocation` */
669
+ interface EdgeSkaterShotLocation {
670
+ shotLocationDetails: {
671
+ area: string;
672
+ sog: number;
673
+ goals: number;
674
+ shootingPctg: number | null;
675
+ sogPercentile: number;
676
+ goalsPercentile: number;
677
+ shootingPctgPercentile: number | null;
678
+ }[];
679
+ shotLocationTotals: {
680
+ locationCode: string;
681
+ sog: number;
682
+ goals: number;
683
+ shootingPctg: number;
684
+ sogPercentile: number;
685
+ goalsPercentile: number;
686
+ shootingPctgPercentile: number;
687
+ sogLeagueAvg: number;
688
+ goalsLeagueAvg: number;
689
+ shootingPctgLeagueAvg: number;
690
+ }[];
691
+ }
692
+ /** Response of `adv.skaters.shotSpeed` */
693
+ interface EdgeSkaterShotSpeed {
694
+ hardestShots: {
695
+ gameCenterLink: string;
696
+ gameDate: string;
697
+ gameType: number;
698
+ playerOnHomeTeam: boolean;
699
+ shotSpeed: EdgeMeasurement;
700
+ timeInPeriod: string;
701
+ periodDescriptor: EdgePeriodDescriptor;
702
+ homeTeam: EdgeTeam;
703
+ awayTeam: EdgeTeam;
704
+ }[];
705
+ shotSpeedDetails: {
706
+ topShotSpeed: {
707
+ imperial: number;
708
+ metric: number;
709
+ percentile: number;
710
+ leagueAvg: EdgeMeasurement;
711
+ overlay: EdgeOverlay;
712
+ };
713
+ avgShotSpeed: {
714
+ imperial: number;
715
+ metric: number;
716
+ percentile: number;
717
+ leagueAvg: EdgeMeasurement;
718
+ };
719
+ shotAttemptsOver100: {
720
+ value: number;
721
+ percentile: number;
722
+ leagueAvg: number;
723
+ };
724
+ shotAttempts90To100: {
725
+ value: number;
726
+ percentile: number;
727
+ leagueAvg: number;
728
+ };
729
+ shotAttempts80To90: {
730
+ value: number;
731
+ percentile: number;
732
+ leagueAvg: number;
733
+ };
734
+ shotAttempts70To80: {
735
+ value: number;
736
+ percentile: number;
737
+ leagueAvg: number;
738
+ };
739
+ };
740
+ }
741
+ /** Response of `adv.skaters.skatingDistance` */
742
+ interface EdgeSkaterSkatingDistance {
743
+ skatingDistanceLast10: {
744
+ gameCenterLink: string;
745
+ gameDate: string;
746
+ playerOnHomeTeam: boolean;
747
+ distanceSkatedAll: EdgeMeasurement;
748
+ toiAll: number;
749
+ distanceSkatedEven: EdgeMeasurement;
750
+ toiEven: number;
751
+ distanceSkatedPP: EdgeMeasurement;
752
+ toiPP: number;
753
+ homeTeam: EdgeTeam;
754
+ awayTeam: EdgeTeam;
755
+ distanceSkatedPK?: EdgeMeasurement;
756
+ toiPK?: number;
757
+ }[];
758
+ skatingDistanceDetails: {
759
+ strengthCode: string;
760
+ distanceTotal: {
761
+ imperial: number;
762
+ metric: number;
763
+ percentile: number;
764
+ leagueAvg: EdgeMeasurement;
765
+ };
766
+ distancePer60: {
767
+ imperial: number;
768
+ metric: number;
769
+ percentile: number;
770
+ leagueAvg: EdgeMeasurement;
771
+ };
772
+ distanceMaxGame: {
773
+ imperial: number;
774
+ metric: number;
775
+ percentile: number;
776
+ leagueAvg: EdgeMeasurement;
777
+ overlay: EdgeOverlay;
778
+ };
779
+ distanceMaxPeriod: {
780
+ imperial: number;
781
+ metric: number;
782
+ percentile: number;
783
+ leagueAvg: EdgeMeasurement;
784
+ overlay: EdgeOverlay;
785
+ };
786
+ }[];
787
+ }
788
+ /** Response of `adv.skaters.skatingSpeed` */
789
+ interface EdgeSkaterSkatingSpeed {
790
+ topSkatingSpeeds: {
791
+ gameCenterLink: string;
792
+ gameDate: string;
793
+ gameType: number;
794
+ playerOnHomeTeam: boolean;
795
+ skatingSpeed: EdgeMeasurement;
796
+ timeInPeriod: string;
797
+ periodDescriptor: EdgePeriodDescriptor;
798
+ homeTeam: EdgeTeam;
799
+ awayTeam: EdgeTeam;
800
+ }[];
801
+ skatingSpeedDetails: {
802
+ maxSkatingSpeed: {
803
+ imperial: number;
804
+ metric: number;
805
+ percentile: number;
806
+ leagueAvg: EdgeMeasurement;
807
+ overlay: EdgeOverlay;
808
+ };
809
+ burstsOver22: {
810
+ value: number;
811
+ percentile: number;
812
+ leagueAvg: number;
813
+ };
814
+ bursts20To22: {
815
+ value: number;
816
+ percentile: number;
817
+ leagueAvg: number;
818
+ };
819
+ bursts18To20: {
820
+ value: number;
821
+ percentile: number;
822
+ leagueAvg: number;
823
+ };
824
+ };
825
+ }
826
+ /** Response of `adv.skaters.zoneTime` */
827
+ interface EdgeSkaterZoneTime {
828
+ zoneTimeDetails: {
829
+ strengthCode: string;
830
+ offensiveZonePctg: number;
831
+ offensiveZonePercentile: number;
832
+ offensiveZoneLeagueAvg: number;
833
+ neutralZonePctg: number;
834
+ neutralZonePercentile: number;
835
+ neutralZoneLeagueAvg: number;
836
+ defensiveZonePctg: number;
837
+ defensiveZonePercentile: number;
838
+ defensiveZoneLeagueAvg: number;
839
+ }[];
840
+ zoneStarts: {
841
+ offensiveZoneStartsPctg: number;
842
+ offensiveZoneStartsPctgPercentile: number;
843
+ neutralZoneStartsPctg: number;
844
+ neutralZoneStartsPctgPercentile: number;
845
+ defensiveZoneStartsPctg: number;
846
+ defensiveZoneStartsPctgPercentile: number;
847
+ };
848
+ }
849
+ /** One row of `adv.skaters.top10.distance` */
850
+ interface EdgeSkaterDistanceTop10Entry {
851
+ player: EdgePlayer;
852
+ distanceTotal: EdgeMeasurement;
853
+ distancePer60: EdgeMeasurement;
854
+ distanceMaxPerGame: {
855
+ imperial: number;
856
+ metric: number;
857
+ overlay: EdgeOverlay;
858
+ };
859
+ distanceMaxPerPeriod: {
860
+ imperial: number;
861
+ metric: number;
862
+ overlay: EdgeOverlay;
863
+ };
864
+ }
865
+ /** Response of `adv.skaters.top10.distance` */
866
+ type EdgeSkaterDistanceTop10 = EdgeSkaterDistanceTop10Entry[];
867
+ /** One row of `adv.skaters.top10.shotLocation` */
868
+ interface EdgeSkaterShotLocationTop10Entry {
869
+ player: EdgePlayer;
870
+ all: number;
871
+ highDanger: number;
872
+ midRange: number;
873
+ longRange: number;
874
+ }
875
+ /** Response of `adv.skaters.top10.shotLocation` */
876
+ type EdgeSkaterShotLocationTop10 = EdgeSkaterShotLocationTop10Entry[];
877
+ /** One row of `adv.skaters.top10.shotSpeed` */
878
+ interface EdgeSkaterShotSpeedTop10Entry {
879
+ player: EdgePlayer;
880
+ hardestShot: {
881
+ imperial: number;
882
+ metric: number;
883
+ overlay: EdgeOverlay;
884
+ };
885
+ shotAttemptsOver100: number;
886
+ shotAttempts90To100: number;
887
+ shotAttempts80To90: number;
888
+ shotAttempts70To80: number;
889
+ }
890
+ /** Response of `adv.skaters.top10.shotSpeed` */
891
+ type EdgeSkaterShotSpeedTop10 = EdgeSkaterShotSpeedTop10Entry[];
892
+ /** One row of `adv.skaters.top10.speed` */
893
+ interface EdgeSkaterSpeedTop10Entry {
894
+ player: EdgePlayer;
895
+ maxSpeed: {
896
+ imperial: number;
897
+ metric: number;
898
+ overlay: EdgeOverlay;
899
+ };
900
+ burstsOver22: number;
901
+ bursts20To22: number;
902
+ bursts18To20: number;
903
+ }
904
+ /** Response of `adv.skaters.top10.speed` */
905
+ type EdgeSkaterSpeedTop10 = EdgeSkaterSpeedTop10Entry[];
906
+ /** One row of `adv.skaters.top10.zoneTime` */
907
+ interface EdgeSkaterZoneTimeTop10Entry {
908
+ player: EdgePlayer;
909
+ offensiveZoneTime: number;
910
+ neutralZoneTime: number;
911
+ defensiveZoneTime: number;
912
+ }
913
+ /** Response of `adv.skaters.top10.zoneTime` */
914
+ type EdgeSkaterZoneTimeTop10 = EdgeSkaterZoneTimeTop10Entry[];
915
+ /** Response of `adv.goalies.player` */
916
+ interface EdgeGoalieDetail {
917
+ player: EdgePlayer;
918
+ seasonsWithEdgeStats: EdgeSeason[];
919
+ stats: {
920
+ goalsAgainstAvg: {
921
+ value: number;
922
+ percentile: number;
923
+ leagueAvg: number;
924
+ };
925
+ gamesAbove900: {
926
+ value: number;
927
+ percentile: number;
928
+ leagueAvg: number;
929
+ };
930
+ goalDifferentialPer60: {
931
+ value: number;
932
+ percentile: number;
933
+ leagueAvg: number;
934
+ };
935
+ goalSupportAvg: {
936
+ value: number;
937
+ percentile: number;
938
+ leagueAvg: number;
939
+ };
940
+ pointPctg: {
941
+ value: number;
942
+ percentile: number;
943
+ leagueAvg: number;
944
+ };
945
+ };
946
+ shotLocationSummary: {
947
+ locationCode: string;
948
+ goalsAgainst: number;
949
+ goalsAgainstPercentile: number;
950
+ goalsAgainstLeagueAvg: number;
951
+ saves: number;
952
+ savesPercentile: number;
953
+ savesLeagueAvg: number;
954
+ savePctg: number;
955
+ savePctgPercentile: number;
956
+ savePctgLeagueAvg: number;
957
+ }[];
958
+ shotLocationDetails: {
959
+ area: string;
960
+ saves: number;
961
+ savesPercentile: number;
962
+ savePctg: number;
963
+ savePctgPercentile: number;
964
+ }[];
965
+ }
966
+ /** Response of `adv.goalies.compare` */
967
+ interface EdgeGoalieComparison {
968
+ player: EdgePlayer;
969
+ seasonsWithEdgeStats: EdgeSeason[];
970
+ shotLocationSummary: {
971
+ locationCode: string;
972
+ shotsAgainst: number;
973
+ goalsAgainst: number;
974
+ saves: number;
975
+ savePctg: number;
976
+ }[];
977
+ shotLocationDetails: {
978
+ area: string;
979
+ goalsAgainst: number;
980
+ shotsAgainst: number;
981
+ saves: number;
982
+ savePctg: number;
983
+ }[];
984
+ savePctg5v5Last10: EdgeGoalieGame[];
985
+ savePctg5v5Details: {
986
+ savePctg: number;
987
+ savePctgClose: number;
988
+ shots: number;
989
+ shotsPer60: number;
990
+ };
991
+ savePctgLast10: EdgeGoalieGame[];
992
+ savePctgDetails: {
993
+ gamesAbove900: number;
994
+ pctgGamesAbove900: number;
995
+ pointPctg: number;
996
+ goalsAgainstAvg: number;
997
+ savePctg: number;
998
+ };
999
+ }
1000
+ /** Response of `adv.goalies.leaders` */
1001
+ interface EdgeGoalieLanding {
1002
+ seasonsWithEdgeStats: EdgeSeason[];
1003
+ minimumGamesPlayed?: number;
1004
+ leaders: {
1005
+ highDangerSavePctg: {
1006
+ player: EdgePlayer;
1007
+ savePctg: number;
1008
+ shotLocationDetails: {
1009
+ area: string;
1010
+ savePctg: number;
1011
+ savePctgPercentile: number;
1012
+ }[];
1013
+ };
1014
+ highDangerSaves: {
1015
+ player: EdgePlayer;
1016
+ saves: number;
1017
+ shotLocationDetails: {
1018
+ area: string;
1019
+ saves: number;
1020
+ savesPercentile: number;
1021
+ }[];
1022
+ };
1023
+ highDangerGoalsAgainst: {
1024
+ player: EdgePlayer;
1025
+ goalsAgainst: number;
1026
+ };
1027
+ savePctg5v5: {
1028
+ player: EdgePlayer;
1029
+ savePctg: number;
1030
+ };
1031
+ gamesAbove900: {
1032
+ player: EdgePlayer;
1033
+ games: number;
1034
+ };
1035
+ };
1036
+ minimumMinutesPlayed?: number;
1037
+ }
1038
+ /** A goalie's save percentage in one of their last 10 games */
1039
+ interface EdgeGoalieGame {
1040
+ gameCenterLink: string;
1041
+ savePctg: number;
1042
+ gameDate: string;
1043
+ playerOnHomeTeam: boolean;
1044
+ homeTeam: EdgeTeam;
1045
+ awayTeam: EdgeTeam;
1046
+ }
1047
+ /** `EdgeGoalieGame` with the goalie's decision (`W`, `L` or `O`) */
1048
+ interface EdgeGoalieGameDecision extends EdgeGoalieGame {
1049
+ decision: string;
1050
+ }
1051
+ /** Response of `adv.goalies.savePercentage` */
1052
+ interface EdgeGoalieSavePercentage {
1053
+ savePctgLast10: EdgeGoalieGameDecision[];
1054
+ savePctgDetails: {
1055
+ gamesAbove900: {
1056
+ value: number;
1057
+ percentile: number;
1058
+ leagueAvg: number;
1059
+ };
1060
+ pctgGamesAbove900: {
1061
+ value: number;
1062
+ percentile: number;
1063
+ leagueAvg: number;
1064
+ };
1065
+ };
1066
+ }
1067
+ /** Response of `adv.goalies.savePercentage5v5` */
1068
+ interface EdgeGoalieSavePercentage5v5 {
1069
+ savePctg5v5Last10: EdgeGoalieGameDecision[];
1070
+ savePctg5v5Details: {
1071
+ savePctg: {
1072
+ value: number;
1073
+ leagueAvg: number;
1074
+ percentile: number;
1075
+ };
1076
+ savePctgClose: {
1077
+ value: number;
1078
+ leagueAvg: number;
1079
+ percentile: number;
1080
+ };
1081
+ shots: {
1082
+ value: number;
1083
+ leagueAvg: number;
1084
+ percentile: number;
1085
+ };
1086
+ shotsPer60: {
1087
+ value: number;
1088
+ leagueAvg: number;
1089
+ percentile: number;
1090
+ };
1091
+ };
1092
+ }
1093
+ /** Response of `adv.goalies.saveLocation` */
1094
+ interface EdgeGoalieShotLocation {
1095
+ shotLocationDetails: {
1096
+ area: string;
1097
+ shotsAgainst: number;
1098
+ saves: number;
1099
+ goalsAgainst: number;
1100
+ savePctg: number;
1101
+ shotsAgainstPercentile: number;
1102
+ savesPercentile: number;
1103
+ goalsAgainstPercentile: number;
1104
+ savePctgPercentile: number;
1105
+ }[];
1106
+ shotLocationTotals: {
1107
+ locationCode: string;
1108
+ shotsAgainst: number;
1109
+ goalsAgainst: number;
1110
+ saves: number;
1111
+ savePctg: number;
1112
+ shotsAgainstPercentile: number;
1113
+ goalsAgainstPercentile: number;
1114
+ savesPercentile: number;
1115
+ savePctgPercentile: number;
1116
+ shotsAgainstLeagueAvg: number;
1117
+ goalsAgainstLeagueAvg: number;
1118
+ savesLeagueAvg: number;
1119
+ savePctgLeagueAvg: number;
1120
+ }[];
1121
+ }
1122
+ /** One row of `adv.goalies.top10.savePercentage` */
1123
+ interface EdgeGoalieSavePercentageTop10Entry {
1124
+ player: EdgePlayer;
1125
+ gamesOver900: number;
1126
+ pctgGamesOver900: number;
1127
+ }
1128
+ /** Response of `adv.goalies.top10.savePercentage` */
1129
+ type EdgeGoalieSavePercentageTop10 = EdgeGoalieSavePercentageTop10Entry[];
1130
+ /** One row of `adv.goalies.top10.savePercentage5v5` */
1131
+ interface EdgeGoalieSavePercentage5v5Top10Entry {
1132
+ player: EdgePlayer;
1133
+ savePctg: number;
1134
+ savePctgClose: number;
1135
+ shots: number;
1136
+ shotsPer60: number;
1137
+ }
1138
+ /** Response of `adv.goalies.top10.savePercentage5v5` */
1139
+ type EdgeGoalieSavePercentage5v5Top10 = EdgeGoalieSavePercentage5v5Top10Entry[];
1140
+ /** One row of `adv.goalies.top10.saveLocation` */
1141
+ interface EdgeGoalieShotLocationTop10Entry {
1142
+ player: EdgePlayer;
1143
+ all: number;
1144
+ highDanger: number;
1145
+ midRange: number;
1146
+ longRange: number;
1147
+ }
1148
+ /** Response of `adv.goalies.top10.saveLocation` */
1149
+ type EdgeGoalieShotLocationTop10 = EdgeGoalieShotLocationTop10Entry[];
1150
+ /** Response of `adv.teams.stats` */
1151
+ interface EdgeTeamDetail {
1152
+ team: EdgeTeam;
1153
+ seasonsWithEdgeStats: EdgeSeason[];
1154
+ shotSpeed: {
1155
+ shotAttemptsOver90: {
1156
+ value: number;
1157
+ rank: number;
1158
+ };
1159
+ topShotSpeed: {
1160
+ imperial: number;
1161
+ metric: number;
1162
+ rank: number;
1163
+ leagueAvg: EdgeMeasurement;
1164
+ overlay: EdgeOverlay;
1165
+ };
1166
+ };
1167
+ skatingSpeed: {
1168
+ burstsOver22: {
1169
+ value: number;
1170
+ rank: number;
1171
+ };
1172
+ burstsOver20: {
1173
+ value: number;
1174
+ rank: number;
1175
+ leagueAvg: {
1176
+ value: number;
1177
+ };
1178
+ };
1179
+ speedMax: {
1180
+ imperial: number;
1181
+ metric: number;
1182
+ rank: number;
1183
+ leagueAvg: EdgeMeasurement;
1184
+ overlay: EdgeOverlay;
1185
+ };
1186
+ };
1187
+ distanceSkated: {
1188
+ total: {
1189
+ imperial: number;
1190
+ metric: number;
1191
+ rank: number;
1192
+ leagueAvg: EdgeMeasurement;
1193
+ };
1194
+ };
1195
+ sogSummary: {
1196
+ locationCode: string;
1197
+ shots: number;
1198
+ shotsRank: number;
1199
+ shotsLeagueAvg: number;
1200
+ shootingPctg: number;
1201
+ shootingPctgRank: number;
1202
+ shootingPctgLeagueAvg: number;
1203
+ goals: number;
1204
+ goalsRank: number;
1205
+ goalsLeagueAvg: number;
1206
+ }[];
1207
+ sogDetails: {
1208
+ area: string;
1209
+ shots: number;
1210
+ shotsRank: number;
1211
+ }[];
1212
+ zoneTimeDetails: {
1213
+ offensiveZonePctg: number;
1214
+ offensiveZoneRank: number;
1215
+ offensiveZoneLeagueAvg: number;
1216
+ offensiveZoneEvPctg: number;
1217
+ offensiveZoneEvRank: number;
1218
+ offensiveZoneEvLeagueAvg: number;
1219
+ neutralZonePctg: number;
1220
+ neutralZoneRank: number;
1221
+ neutralZoneLeagueAvg: number;
1222
+ defensiveZonePctg: number;
1223
+ defensiveZoneRank: number;
1224
+ defensiveZoneLeagueAvg: number;
1225
+ };
1226
+ }
1227
+ /** Response of `adv.teams.compare` */
1228
+ interface EdgeTeamComparison {
1229
+ team: EdgeTeam;
1230
+ seasonsWithEdgeStats: EdgeSeason[];
1231
+ shotSpeedDetails: {
1232
+ topShotSpeed: {
1233
+ imperial: number;
1234
+ metric: number;
1235
+ overlay: EdgeOverlay;
1236
+ };
1237
+ avgShotSpeed: EdgeMeasurement;
1238
+ shotAttemptsOver100: number;
1239
+ shotAttempts90To100: number;
1240
+ shotAttempts80To90: number;
1241
+ shotAttempts70To80: number;
1242
+ };
1243
+ skatingSpeedDetails: {
1244
+ maxSkatingSpeed: {
1245
+ imperial: number;
1246
+ metric: number;
1247
+ overlay: EdgeOverlay;
1248
+ };
1249
+ burstsOver22: number;
1250
+ bursts20To22: number;
1251
+ bursts18To20: number;
1252
+ };
1253
+ skatingDistanceLast10: {
1254
+ gameCenterLink: string;
1255
+ gameDate: string;
1256
+ isHomeTeam: boolean;
1257
+ distanceSkated: EdgeMeasurement;
1258
+ homeTeam: EdgeTeam;
1259
+ awayTeam: EdgeTeam;
1260
+ }[];
1261
+ skatingDistanceDetails: {
1262
+ distanceTotal: EdgeMeasurement;
1263
+ distancePer60: EdgeMeasurement;
1264
+ distanceMaxGame: {
1265
+ imperial: number;
1266
+ metric: number;
1267
+ overlay: EdgeOverlay;
1268
+ };
1269
+ distanceMaxPeriod: {
1270
+ imperial: number;
1271
+ metric: number;
1272
+ overlay: EdgeOverlay;
1273
+ };
1274
+ };
1275
+ shotLocationDetails: {
1276
+ area: string;
1277
+ sog: number;
1278
+ goals: number;
1279
+ shootingPctg: number;
1280
+ }[];
1281
+ shotLocationTotals: {
1282
+ locationCode: string;
1283
+ sog: number;
1284
+ goals: number;
1285
+ shootingPctg: number;
1286
+ }[];
1287
+ zoneTimeDetails: {
1288
+ offensiveZonePctg: number;
1289
+ offensiveZoneLeagueAvg: number;
1290
+ neutralZonePctg: number;
1291
+ neutralZoneLeagueAvg: number;
1292
+ defensiveZonePctg: number;
1293
+ defensiveZoneLeagueAvg: number;
1294
+ };
1295
+ shotDifferential: {
1296
+ shotAttemptDifferential: number;
1297
+ sogDifferential: number;
1298
+ };
1299
+ }
1300
+ /** Response of `adv.teams.leaders` */
1301
+ interface EdgeTeamLanding {
1302
+ seasonsWithEdgeStats: EdgeSeason[];
1303
+ leaders: {
1304
+ shotAttemptsOver90: {
1305
+ team: EdgeTeam;
1306
+ attempts: number;
1307
+ };
1308
+ burstsOver22: {
1309
+ team: EdgeTeam;
1310
+ bursts: number;
1311
+ };
1312
+ distancePer60: {
1313
+ team: EdgeTeam;
1314
+ distanceSkated: EdgeMeasurement;
1315
+ };
1316
+ highDangerSOG: {
1317
+ team: EdgeTeam;
1318
+ sog: number;
1319
+ shotLocationDetails: {
1320
+ area: string;
1321
+ sog: number;
1322
+ rank: number;
1323
+ }[];
1324
+ };
1325
+ offensiveZoneTime: {
1326
+ team: EdgeTeam;
1327
+ zoneTime: number;
1328
+ };
1329
+ neutralZoneTime: {
1330
+ team: EdgeTeam;
1331
+ zoneTime: number;
1332
+ };
1333
+ defensiveZoneTime: {
1334
+ team: EdgeTeam;
1335
+ zoneTime: number;
1336
+ };
1337
+ };
1338
+ }
1339
+ /** Response of `adv.teams.shotLocation` */
1340
+ interface EdgeTeamShotLocation {
1341
+ shotLocationDetails: {
1342
+ area: string;
1343
+ sog: number;
1344
+ sogRank: number;
1345
+ goals: number;
1346
+ goalsRank: number;
1347
+ shootingPctg: number | null;
1348
+ shootingPctgRank: number | null;
1349
+ }[];
1350
+ shotLocationTotals: {
1351
+ locationCode: string;
1352
+ position: string;
1353
+ sog: number;
1354
+ sogRank: number;
1355
+ sogLeagueAvg: number;
1356
+ goals: number;
1357
+ goalsRank: number;
1358
+ goalsLeagueAvg: number;
1359
+ shootingPctg: number;
1360
+ shootingPctgRank: number;
1361
+ shootingPctgLeagueAvg: number;
1362
+ }[];
1363
+ }
1364
+ /** Response of `adv.teams.shotSpeed` */
1365
+ interface EdgeTeamShotSpeed {
1366
+ hardestShots: {
1367
+ player: EdgePlayer;
1368
+ gameCenterLink: string;
1369
+ gameDate: string;
1370
+ gameType: number;
1371
+ isHomeTeam: boolean;
1372
+ shotSpeed: EdgeMeasurement;
1373
+ timeInPeriod: string;
1374
+ periodDescriptor: EdgePeriodDescriptor;
1375
+ homeTeam: EdgeTeam;
1376
+ awayTeam: EdgeTeam;
1377
+ }[];
1378
+ shotSpeedDetails: {
1379
+ position: string;
1380
+ topShotSpeed: {
1381
+ imperial: number;
1382
+ metric: number;
1383
+ rank: number;
1384
+ leagueAvg: EdgeMeasurement;
1385
+ overlay: EdgeOverlay;
1386
+ };
1387
+ avgShotSpeed: {
1388
+ imperial: number;
1389
+ metric: number;
1390
+ rank: number;
1391
+ leagueAvg: EdgeMeasurement;
1392
+ };
1393
+ shotAttemptsOver100: {
1394
+ value: number;
1395
+ rank: number;
1396
+ leagueAvg: number;
1397
+ };
1398
+ shotAttempts90To100: {
1399
+ value: number;
1400
+ rank: number;
1401
+ leagueAvg: number;
1402
+ };
1403
+ shotAttempts80To90: {
1404
+ value: number;
1405
+ leagueAvg: number;
1406
+ };
1407
+ shotAttempts70To80: {
1408
+ value: number;
1409
+ leagueAvg: number;
1410
+ };
1411
+ }[];
1412
+ }
1413
+ /** Response of `adv.teams.skatingDistance` */
1414
+ interface EdgeTeamSkatingDistance {
1415
+ skatingDistanceLast10: {
1416
+ gameCenterLink: string;
1417
+ gameDate: string;
1418
+ isHomeTeam: boolean;
1419
+ toiAll: number;
1420
+ distanceSkatedAll: EdgeMeasurement;
1421
+ toiEven: number;
1422
+ distanceSkatedEven: EdgeMeasurement;
1423
+ toiPP?: number;
1424
+ distanceSkatedPP?: EdgeMeasurement;
1425
+ toiPK: number;
1426
+ distanceSkatedPK: EdgeMeasurement;
1427
+ homeTeam: EdgeTeam;
1428
+ awayTeam: EdgeTeam;
1429
+ }[];
1430
+ skatingDistanceDetails: {
1431
+ strengthCode: string;
1432
+ positionCode: string;
1433
+ distanceTotal: {
1434
+ imperial: number;
1435
+ metric: number;
1436
+ rank: number;
1437
+ leagueAvg: EdgeMeasurement;
1438
+ };
1439
+ distancePer60: {
1440
+ imperial: number;
1441
+ metric: number;
1442
+ rank: number;
1443
+ leagueAvg: EdgeMeasurement;
1444
+ };
1445
+ distanceMaxGame: {
1446
+ imperial: number;
1447
+ metric: number;
1448
+ rank: number;
1449
+ leagueAvg: EdgeMeasurement;
1450
+ overlay: EdgeOverlay;
1451
+ };
1452
+ distanceMaxPeriod: {
1453
+ imperial: number;
1454
+ metric: number;
1455
+ rank: number;
1456
+ leagueAvg: EdgeMeasurement;
1457
+ overlay: EdgeOverlay;
1458
+ };
1459
+ }[];
1460
+ }
1461
+ /** Response of `adv.teams.skatingSpeed` */
1462
+ interface EdgeTeamSkatingSpeed {
1463
+ topSkatingSpeeds: {
1464
+ player: EdgePlayer;
1465
+ gameCenterLink: string;
1466
+ gameDate: string;
1467
+ gameType: number;
1468
+ isHomeTeam: boolean;
1469
+ skatingSpeed: EdgeMeasurement;
1470
+ timeInPeriod: string;
1471
+ periodDescriptor: EdgePeriodDescriptor;
1472
+ homeTeam: EdgeTeam;
1473
+ awayTeam: EdgeTeam;
1474
+ }[];
1475
+ skatingSpeedDetails: {
1476
+ positionCode: string;
1477
+ maxSkatingSpeed: {
1478
+ imperial: number;
1479
+ metric: number;
1480
+ rank: number;
1481
+ leagueAvg: EdgeMeasurement;
1482
+ overlay: EdgeOverlay;
1483
+ };
1484
+ burstsOver22: {
1485
+ value: number;
1486
+ rank: number;
1487
+ leagueAvg: number;
1488
+ };
1489
+ bursts20To22: {
1490
+ value: number;
1491
+ rank: number;
1492
+ leagueAvg: number;
1493
+ };
1494
+ bursts18To20: {
1495
+ value: number;
1496
+ rank: number;
1497
+ leagueAvg: number;
1498
+ };
1499
+ }[];
1500
+ }
1501
+ /** Response of `adv.teams.zoneTime` */
1502
+ interface EdgeTeamZoneTime {
1503
+ zoneTimeDetails: {
1504
+ strengthCode: string;
1505
+ offensiveZonePctg: number;
1506
+ offensiveZoneRank: number;
1507
+ offensiveZoneLeagueAvg: number;
1508
+ neutralZonePctg: number;
1509
+ neutralZoneRank: number;
1510
+ neutralZoneLeagueAvg: number;
1511
+ defensiveZonePctg: number;
1512
+ defensiveZoneRank: number;
1513
+ defensiveZoneLeagueAvg: number;
1514
+ }[];
1515
+ shotDifferential: {
1516
+ shotAttemptDifferential: number;
1517
+ shotAttemptDifferentialRank: number;
1518
+ sogDifferential: number;
1519
+ sogDifferentialRank: number;
1520
+ };
1521
+ }
1522
+ /** One row of `adv.teams.top10.shotLocation` */
1523
+ interface EdgeTeamShotLocationTop10Entry {
1524
+ team: EdgeTeam;
1525
+ all: number;
1526
+ highDanger: number;
1527
+ midRange: number;
1528
+ longRange: number;
1529
+ }
1530
+ /** Response of `adv.teams.top10.shotLocation` */
1531
+ type EdgeTeamShotLocationTop10 = EdgeTeamShotLocationTop10Entry[];
1532
+ /** One row of `adv.teams.top10.shotSpeed` */
1533
+ interface EdgeTeamShotSpeedTop10Entry {
1534
+ team: EdgeTeam;
1535
+ hardestShot: {
1536
+ imperial: number;
1537
+ metric: number;
1538
+ overlay: EdgeOverlay;
1539
+ };
1540
+ shotAttemptsOver100: number;
1541
+ shotAttempts90To100: number;
1542
+ shotAttempts80To90: number;
1543
+ shotAttempts70To80: number;
1544
+ }
1545
+ /** Response of `adv.teams.top10.shotSpeed` */
1546
+ type EdgeTeamShotSpeedTop10 = EdgeTeamShotSpeedTop10Entry[];
1547
+ /** One row of `adv.teams.top10.skatingDistance` */
1548
+ interface EdgeTeamSkatingDistanceTop10Entry {
1549
+ team: EdgeTeam;
1550
+ distanceTotal: EdgeMeasurement;
1551
+ distancePer60: EdgeMeasurement;
1552
+ distanceMaxPerGame: {
1553
+ imperial: number;
1554
+ metric: number;
1555
+ overlay: EdgeOverlay;
1556
+ };
1557
+ distanceMaxPerPeriod: {
1558
+ imperial: number;
1559
+ metric: number;
1560
+ overlay: EdgeOverlay;
1561
+ };
1562
+ }
1563
+ /** Response of `adv.teams.top10.skatingDistance` */
1564
+ type EdgeTeamSkatingDistanceTop10 = EdgeTeamSkatingDistanceTop10Entry[];
1565
+ /** One row of `adv.teams.top10.skatingSpeed` */
1566
+ interface EdgeTeamSkatingSpeedTop10Entry {
1567
+ team: EdgeTeam;
1568
+ maxSkatingSpeed: {
1569
+ imperial: number;
1570
+ metric: number;
1571
+ overlay: EdgeOverlay;
1572
+ };
1573
+ burstsOver22: number;
1574
+ bursts20To22: number;
1575
+ bursts18To20: number;
1576
+ }
1577
+ /** Response of `adv.teams.top10.skatingSpeed` */
1578
+ type EdgeTeamSkatingSpeedTop10 = EdgeTeamSkatingSpeedTop10Entry[];
1579
+ /** One row of `adv.teams.top10.zoneTime` */
1580
+ interface EdgeTeamZoneTimeTop10Entry {
1581
+ team: EdgeTeam;
1582
+ offensiveZoneTime: number;
1583
+ neutralZoneTime: number;
1584
+ defensiveZoneTime: number;
1585
+ }
1586
+ /** Response of `adv.teams.top10.zoneTime` */
1587
+ type EdgeTeamZoneTimeTop10 = EdgeTeamZoneTimeTop10Entry[];
1588
+
1589
+ /** Categories for save location top-10 list */
1590
+ declare const SaveLocationCategoryEnum: {
1591
+ /** Save Percentage */
1592
+ readonly 'SV%': "save-pctg";
1593
+ /** Saves */
1594
+ readonly SV: "saves";
1595
+ /** Shots Against */
1596
+ readonly SA: "shots-against";
1597
+ /** Goals Against */
1598
+ readonly GA: "goals-against";
1599
+ };
1600
+ /** Sort options for shot location top-10 list */
1601
+ declare const ShotLocationSortEnum: {
1602
+ /** All shot locations */
1603
+ readonly ALL: "all";
1604
+ /** High-danger (i.e. close-range) shot locations */
1605
+ readonly HIGH: "high";
1606
+ /** Mid-range shot locations */
1607
+ readonly MID: "mid";
1608
+ /** Long-range shot locations */
1609
+ readonly LONG: "long";
1610
+ };
1611
+ /** Alias for ShotLocationSortEnum */
1612
+ declare const SaveLocationSortEnum: {
1613
+ /** All shot locations */
1614
+ readonly ALL: "all";
1615
+ /** High-danger (i.e. close-range) shot locations */
1616
+ readonly HIGH: "high";
1617
+ /** Mid-range shot locations */
1618
+ readonly MID: "mid";
1619
+ /** Long-range shot locations */
1620
+ readonly LONG: "long";
1621
+ };
1622
+ /** Sort options for 5v5 save percentage top-10 list */
1623
+ declare const SavePercentage5v5SortEnum: {
1624
+ /**5v5 Save %: The percentage of shots a goalie stops at even strength (5-on-5). */
1625
+ readonly '5v5-SV%': "save-pctg";
1626
+ /**5v5 Save % in Close Situations: A “close situation” is the time during which a game is tied in the first or second period, or within one goal in the third period. This stats helps how goalies perform in high-pressure situations.*/
1627
+ readonly '5v5-SV%-Close': "save-pctg-close";
1628
+ /**5v5 Shots Against: The total number of shots a goalie faces at even strength (5-on-5).*/
1629
+ readonly '5v5-SA': "shots";
1630
+ /**5v5 Shots Against per 60 Minutes: The total number of shots a goalie faces at even strength (5-on-5) normalized to a 60-minute game. */
1631
+ readonly '5v5-SA/60': "shots-per-60";
1632
+ };
1633
+ /** Sort options for save percentage top-10 list */
1634
+ declare const SavePercentageSortEnum: {
1635
+ /** Starts above .900 */
1636
+ readonly GAMES: "games";
1637
+ /** Percentage of starts above .900 */
1638
+ readonly PCTG: "pctg";
1639
+ };
1640
+ /** Filter options for player positions */
1641
+ declare const PositionFilterEnum: {
1642
+ /** Center */
1643
+ readonly ALL: "all";
1644
+ /** Left Wing */
1645
+ readonly FWD: "forwards";
1646
+ /** Right Wing */
1647
+ readonly DEF: "defense";
1648
+ };
1649
+ /** Categories for skater strength */
1650
+ declare const SkatersStrengthEnum: {
1651
+ /** All strengths */
1652
+ readonly ALL: "all";
1653
+ /** Even strength */
1654
+ readonly ES: "es";
1655
+ /** Power play */
1656
+ readonly PP: "pp";
1657
+ /** Short-handed */
1658
+ readonly PK: "pk";
1659
+ };
1660
+ /** Sorting options for shot speed top-10 list */
1661
+ declare const ShotSpeedSortEnum: {
1662
+ /** Hardest shot recorded by player */
1663
+ readonly MAX: "max";
1664
+ /** Shots over 100 mph */
1665
+ readonly 'OVER-100': "over-100";
1666
+ /** Shots between 90 and 99 mph */
1667
+ readonly '90-99': "90-99";
1668
+ /** Shots between 80 and 89 mph */
1669
+ readonly '80-89': "80-89";
1670
+ /** Shots between 70 and 79 mph */
1671
+ readonly '70-79': "70-79";
1672
+ };
1673
+ /** Sorting options for skating speed top-10 list */
1674
+ declare const SkatingSpeedSortEnum: {
1675
+ /** Fastest skating speed recorded by player */
1676
+ readonly TOP: "max";
1677
+ /** Speed bursts recorded over 22 mph */
1678
+ readonly 'OVER-22': "over-22";
1679
+ /** Speed bursts recorded between 20 and 22 mph */
1680
+ readonly '20-22': "20-22";
1681
+ /** Speed bursts recorded between 18 and 20 mph */
1682
+ readonly '18-20': "18-20";
1683
+ };
1684
+ /** Sorting options for skating distance top-10 list */
1685
+ declare const SkatingDistanceSortEnum: {
1686
+ /** Total distance skated */
1687
+ TOTAL: string;
1688
+ /** Average distance skated per 60 minutes */
1689
+ 'PER-60': string;
1690
+ /** Maximum distance skated in a single period */
1691
+ 'MAX-PERIOD': string;
1692
+ /** Maximum distance skated in a single game */
1693
+ 'MAX-GAME': string;
1694
+ };
1695
+ /** Categories for shot location top-10 list */
1696
+ declare const ShotLocationCategoryEnum: {
1697
+ /** Total shots on goal */
1698
+ readonly SOG: "sog";
1699
+ /** Total goals */
1700
+ readonly G: "goals";
1701
+ /** Shooting percentage */
1702
+ readonly 'SH%': "shooting-pctg";
1703
+ };
1704
+ /** Sorting options for zone time top-10 lists. */
1705
+ declare const ZoneTimeSortEnum: {
1706
+ /** Percentage of time spent in the offensive zone */
1707
+ readonly OZ: "offensive";
1708
+ /** Percentage of time spent in the defensive zone */
1709
+ readonly DZ: "defensive";
1710
+ /** Percentage of time spent in the neutral zone */
1711
+ readonly NZ: "neutral";
1712
+ };
1713
+
1714
+ declare const Year$1: arktype.BaseType<number | ((In: string) => arktype_internal_attributes_ts.To<number>), {}>;
1715
+ declare const NHLMonth$1: arktype_internal_variants_object_ts.ObjectType<(In: string | Date) => Out<string>, {}>;
1716
+ declare const NHLDate$1: arktype_internal_variants_object_ts.ObjectType<(In: string | Date) => Out<string>, {}>;
1717
+ declare const Season$2: arktype_internal_variants_object_ts.ObjectType<(In: string | number) => Out<string>, {}>;
1718
+ declare const TeamAbbrev$1: arktype_internal_variants_string_ts.StringType<"MIN" | "ANA" | "BOS" | "BUF" | "CGY" | "CAR" | "CHI" | "COL" | "CBJ" | "DAL" | "DET" | "EDM" | "FLA" | "LAK" | "MTL" | "NJD" | "NSH" | "NYI" | "NYR" | "OTT" | "PHI" | "PIT" | "SJS" | "SEA" | "STL" | "TBL" | "TOR" | "UTA" | "VAN" | "VGK" | "WPG" | "WSH" | "AFM" | "ARI" | "ATL" | "BRK" | "CGS" | "CLE" | "CLR" | "DCG" | "DFL" | "HAM" | "HFD" | "KCS" | "MMR" | "MNS" | "MWN" | "NYA" | "OAK" | "PHX" | "PIR" | "QBD" | "QUA" | "QUE" | "SEN" | "SLE" | "TAN" | "TSP" | "WIN", {}>;
1719
+ declare const TeamId$1: arktype_internal_variants_number_ts.NumberType<1 | 2 | 3 | 4 | 10 | 8 | 7 | 24 | 6 | 20 | 12 | 16 | 21 | 29 | 25 | 17 | 22 | 13 | 26 | 30 | 18 | 9 | 5 | 28 | 55 | 19 | 14 | 59 | 23 | 54 | 52 | 15 | 47 | 53 | 11 | 51 | 56 | 49 | 35 | 40 | 50 | 37 | 34 | 48 | 43 | 31 | 41 | 44 | 46 | 27 | 38 | 42 | 39 | 32 | 36 | 45 | 57 | 58 | 33, {}>;
1720
+ declare const GameType$1: arktype.BaseType<1 | 2 | 3 | 4 | 19 | ((In: "PRE" | "REG" | "POST" | "ASG" | "INTL") => Out<1 | 2 | 3 | 4 | 19>), {}>;
1721
+ declare const GameNumber$1: arktype_internal_variants_object_ts.ObjectType<(In: string | number) => Out<string>, {}>;
1722
+ declare const DraftRound$1: arktype_internal_variants_object_ts.ObjectType<(In: string | number) => Out<string>, {}>;
1723
+ declare const EventId$1: arktype.BaseType<number | ((In: string) => arktype_internal_attributes_ts.To<number>), {}>;
1724
+ declare const GameId$1: arktype.BaseType<number | ((In: string) => arktype_internal_attributes_ts.To<number>), {}>;
1725
+ declare const SeriesLetter$2: arktype_internal_variants_string_ts.StringType<"H" | "A" | "N" | "C" | "L" | "D" | "G" | "F" | "O" | "B" | "E" | "I" | "J" | "K" | "M", {}>;
1726
+ declare const GameState$1: arktype_internal_variants_string_ts.StringType<"FUT" | "LIV" | "FIN", {}>;
1727
+ declare const CountryCode$1: arktype_internal_variants_object_ts.ObjectType<(In: string) => Out<string>, {}>;
1728
+ declare const PostalCode$1: arktype_internal_variants_object_ts.ObjectType<(In: string) => Out<string>, {}>;
1729
+ declare const PlayerId$1: arktype_internal_variants_object_ts.ObjectType<(In: string | number) => Out<string>, {}>;
1730
+
1731
+ /**
1732
+ * Represents a valid NHL year (e.g., 2023, 2024, ...)
1733
+ */
1734
+ type Year = typeof Year$1.inferIn;
1735
+ /**
1736
+ * Represents an NHL season in the format YYYYYYYY (e.g., 20232024)
1737
+ */
1738
+ type Season$1 = typeof Season$2.inferIn;
1739
+ /**
1740
+ * Represents a valid NHL game type (e.g. REG, PRE, POST)
1741
+ */
1742
+ type GameType = typeof GameType$1.inferIn;
1743
+ /**
1744
+ * Represents an NHL game ID with regex /\d{10}/
1745
+ * Breakdown of the ID: (YYYYTTNNNN)
1746
+ * - First 4 digits: Year of the game (YYYY)
1747
+ * - Next 2 digits: Game type (TT)(01 for preseason, 02 for regular
1748
+ * season, 03 for playoffs)
1749
+ * - Next 4 digits: Game number of the season (NNNN)
1750
+ */
1751
+ type GameId = typeof GameId$1.inferIn;
1752
+ /**
1753
+ * Represents a valid NHL team abbreviation (e.g., NYR, MTL, ...)
1754
+ */
1755
+ type TeamAbbrev = typeof TeamAbbrev$1.inferIn | (string & {});
1756
+ /**
1757
+ * Represents a valid NHL team ID
1758
+ */
1759
+ type TeamId = typeof TeamId$1.inferIn | (number & {});
1760
+ /**
1761
+ * Represents a valid NHL game number
1762
+ */
1763
+ type GameNumber = typeof GameNumber$1.inferIn;
1764
+ /**
1765
+ * Represents a valid NHL game state
1766
+ */
1767
+ type GameState = typeof GameState$1.inferIn;
1768
+ /**
1769
+ * Represents a valid draft round (1-7)
1770
+ */
1771
+ type DraftRound = typeof DraftRound$1.inferIn;
1772
+ /**
1773
+ * Represents a valid NHL event ID
1774
+ */
1775
+ type EventId = typeof EventId$1.inferIn;
1776
+ /**
1777
+ * Represents a valid NHL date in the format YYYY-MM-DD
1778
+ */
1779
+ type NHLDate = typeof NHLDate$1.inferIn;
1780
+ /**
1781
+ * Represents a valid NHL month in the format YYYY-MM
1782
+ */
1783
+ type NHLMonth = typeof NHLMonth$1.inferIn;
1784
+ /**
1785
+ * Represents a valid NHL series letter (A-O)
1786
+ */
1787
+ type SeriesLetter$1 = typeof SeriesLetter$2.inferIn;
1788
+ /**
1789
+ * Represents the playoff rounds in an NHL season (1-4)
266
1790
  */
267
1791
  type PlayoffRound = 1 | 2 | 3 | 4;
268
1792
  /**
269
- * Represents a valid country code (e.g., CAN, USA, SWE, ...)
1793
+ * Represents a valid country code (e.g., CAN, USA, SWE, ...)
1794
+ */
1795
+ type CountryCode = typeof CountryCode$1.inferIn;
1796
+ /**
1797
+ * Represents a valid country code (e.g., CAN, USA, SWE, ...)
1798
+ */
1799
+ type PostalCode = typeof PostalCode$1.inferIn;
1800
+ /**
1801
+ * Represents a valid NHL player ID
1802
+ */
1803
+ type PlayerId = typeof PlayerId$1.inferIn;
1804
+ /**
1805
+ * Type definitions for enums from constants.ts
1806
+ */
1807
+ /** Categories for shot location top-10 list */
1808
+ type ShotLocationCategory = keyof typeof ShotLocationCategoryEnum;
1809
+ /** Sort options for shot location top-10 list */
1810
+ type ShotLocationSort = keyof typeof ShotLocationSortEnum;
1811
+ /** Sort options for 5v5 save percentage top-10 list */
1812
+ type SavePercentage5v5Sort = keyof typeof SavePercentage5v5SortEnum;
1813
+ /** Sort options for save percentage top-10 list */
1814
+ type SavePercentageSort = keyof typeof SavePercentageSortEnum;
1815
+ /** Categories for save location top-10 list */
1816
+ type SaveLocationCategory = keyof typeof SaveLocationCategoryEnum;
1817
+ /** Sort options for save location top-10 list */
1818
+ type SaveLocationSort = keyof typeof SaveLocationSortEnum;
1819
+ /** Positions filter for player stats */
1820
+ type PositionFilter = keyof typeof PositionFilterEnum;
1821
+ /** Strength situation for skater stats */
1822
+ type SkatersStrength = keyof typeof SkatersStrengthEnum;
1823
+ /** Sort options for shot speed top-10 list */
1824
+ type ShotSpeedSort = keyof typeof ShotSpeedSortEnum;
1825
+ /** Sort options for skating speed top-10 list */
1826
+ type SkatingSpeedSort = keyof typeof SkatingSpeedSortEnum;
1827
+ /** Sort options for skating distance top-10 list */
1828
+ type SkatingDistanceSort = keyof typeof SkatingDistanceSortEnum;
1829
+ /** Sort options for zone time top-10 lists. */
1830
+ type ZoneTimeSort = keyof typeof ZoneTimeSortEnum;
1831
+
1832
+ /**
1833
+ * ======================================================================
1834
+ * API endpoints for goalie-related data.
1835
+ * Base url: api-web.nhle.com/v1/edge
1836
+ *
1837
+ * Notes:
1838
+ * - Convenience endpoints using 'now' for season have been
1839
+ * excluded in favor of using calculated current season. You can optionally
1840
+ * configure the switch over date for how current season is calculated.
1841
+ * See README for details.
1842
+ * - There is an extra endpoint that appears to duplicate
1843
+ * the functionality of /skater-detail at `v1/cat/edge/skater-detail`
1844
+ * As such, it has been excluded from this implementation.
1845
+ * ======================================================================
1846
+ */
1847
+
1848
+ /**
1849
+ * Goalie Edge Advanced Stats API helpers.
1850
+ *
1851
+ * Lightweight wrapper exposing functions that call the underlying nhlClient
1852
+ * for goalie-related endpoints. Each function resolves to an APIResult; invalid
1853
+ * parameters give a ValidationError result without a request.
1854
+ */
1855
+ /**
1856
+ * Get goalie detail for a player.
1857
+ * @param playerId - The player's numeric id.
1858
+ * @param season - Optional season (numeric season format or 'now' via argParse).
1859
+ * @param gameType - Optional game type id.
1860
+ * @returns Promise resolving to an APIResult with the response data.
1861
+ */
1862
+ declare function player$1(playerId: PlayerId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeGoalieDetail>>;
1863
+ /**
1864
+ * Get goalie comparison data for a player.
1865
+ * @param playerId - The player's numeric id.
1866
+ * @param season - Optional season (numeric season format or 'now' via argParse).
1867
+ * @param gameType - Optional game type id.
1868
+ * @returns Promise resolving to an APIResult with the response data.
1869
+ */
1870
+ declare function compare$1(playerId: PlayerId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeGoalieComparison>>;
1871
+ /**
1872
+ * Get goalie landing / leaders for a season.
1873
+ * @param season - Optional season (numeric season format or 'now' via argParse).
1874
+ * @param gameType - Optional game type id.
1875
+ * @returns Promise resolving to an APIResult with the response data.
1876
+ */
1877
+ declare function leaders$2(season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeGoalieLanding>>;
1878
+ /**
1879
+ * Get 5v5 save percentage details for a goalie.
1880
+ * @param playerId - The player's numeric id.
1881
+ * @param season - Optional season (numeric season format or 'now' via argParse).
1882
+ * @param gameType - Optional game type id.
1883
+ * @returns Promise resolving to an APIResult with the response data.
1884
+ */
1885
+ declare function savePercentage5v5(playerId: PlayerId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeGoalieSavePercentage5v5>>;
1886
+ /**
1887
+ * Get save percentage details for a goalie.
1888
+ * @param playerId - The player's numeric id.
1889
+ * @param season - Optional season (numeric season format or 'now' via argParse).
1890
+ * @param gameType - Optional game type id.
1891
+ * @returns Promise resolving to an APIResult with the response data.
1892
+ */
1893
+ declare function savePercentage(playerId: PlayerId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeGoalieSavePercentage>>;
1894
+ /**
1895
+ * Get save location details for a goalie.
1896
+ * @param playerId - The player's numeric id.
1897
+ * @param season - Optional season (numeric season format or 'now' via argParse).
1898
+ * @param gameType - Optional game type id.
1899
+ * @returns Promise resolving to an APIResult with the response data.
1900
+ */
1901
+ declare function saveLocation(playerId: PlayerId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeGoalieShotLocation>>;
1902
+ /**
1903
+ * Accessor for top-10 leaderboards.
1904
+ * @returns Object with methods to fetch various top-10 lists.
1905
+ */
1906
+ declare const top10$2: {
1907
+ savePercentage: typeof top10SavePercentage;
1908
+ savePercentage5v5: typeof top10SavePercentage5v5;
1909
+ saveLocation: typeof top10SaveLocation;
1910
+ };
1911
+ /**
1912
+ * Top-10 edge save percentage lists.
1913
+ * @param sortBy - Sorting key for the leaderboard.
1914
+ * @param season - Optional season (numeric or 'now').
1915
+ * @param gameType - Optional game type id.
1916
+ * @returns Promise resolving to an APIResult with the response data.
1917
+ */
1918
+ declare function top10SavePercentage(season?: Season$1, gameType?: GameType, sortBy?: SavePercentageSort): Promise<APIResult<EdgeGoalieSavePercentageTop10>>;
1919
+ /**
1920
+ * Top-10 5v5 save percentage lists.
1921
+ * @param sortBy - Sorting key for the leaderboard.
1922
+ * @param season - Optional season (numeric or 'now').
1923
+ * @param gameType - Optional game type id.
1924
+ * @returns Promise resolving to an APIResult with the response data.
1925
+ */
1926
+ declare function top10SavePercentage5v5(season?: Season$1, gameType?: GameType, sortBy?: SavePercentage5v5Sort): Promise<APIResult<EdgeGoalieSavePercentage5v5Top10>>;
1927
+ /**
1928
+ * Top-10 save location lists.
1929
+ * @param category - Category key (see SaveLocationCategoryEnum).
1930
+ * @param sortBy - Sorting key for the leaderboard (see SaveLocationSortEnum).
1931
+ * @param season - Optional season (e.g. 20242025).
1932
+ * @param gameType - Optional game type.
1933
+ * @returns Promise resolving to an APIResult with the response data.
1934
+ */
1935
+ declare function top10SaveLocation(season?: Season$1, gameType?: GameType, category?: SaveLocationCategory, sortBy?: SaveLocationSort): Promise<APIResult<EdgeGoalieShotLocationTop10>>;
1936
+
1937
+ declare const goalies$1_saveLocation: typeof saveLocation;
1938
+ declare const goalies$1_savePercentage: typeof savePercentage;
1939
+ declare const goalies$1_savePercentage5v5: typeof savePercentage5v5;
1940
+ declare namespace goalies$1 {
1941
+ export { compare$1 as compare, leaders$2 as leaders, player$1 as player, goalies$1_saveLocation as saveLocation, goalies$1_savePercentage as savePercentage, goalies$1_savePercentage5v5 as savePercentage5v5, top10$2 as top10 };
1942
+ }
1943
+
1944
+ /**
1945
+ * ======================================================================
1946
+ * API endpoints for skater-related data.
1947
+ * Base url: api-web.nhle.com/v1/edge
1948
+ *
1949
+ * Notes:
1950
+ * - Convenience endpoints using 'now' for season have been
1951
+ * excluded in favor of using calculated current season. You can optionally
1952
+ * configure the switch over date for how current season is calculated.
1953
+ * See README for details.
1954
+ * - There is an extra endpoint that appears to duplicate
1955
+ * the functionality of /skater-detail at `v1/cat/edge/skater-detail`
1956
+ * As such, it has been excluded from this implementation.
1957
+ * =====================================================================
1958
+ */
1959
+
1960
+ /**
1961
+ * Skater Edge Advanced Stats API helpers.
1962
+ *
1963
+ * Lightweight wrapper exposing functions that call the underlying nhlClient
1964
+ * for skater-related endpoints. Each function resolves to an APIResult; invalid
1965
+ * parameters give a ValidationError result without a request.
1966
+ */
1967
+ /** Get skater detail for a player. */
1968
+ declare function detail(playerId: PlayerId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeSkaterDetail>>;
1969
+ /** Get skater shot location details for a player. */
1970
+ declare function shotLocation$1(playerId: PlayerId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeSkaterShotLocation>>;
1971
+ /** Get skater shot speed details for a player. */
1972
+ declare function shotSpeed$1(playerId: PlayerId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeSkaterShotSpeed>>;
1973
+ /** Get skater skating distance details for a player. */
1974
+ declare function skatingDistance$1(playerId: PlayerId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeSkaterSkatingDistance>>;
1975
+ /** Get skater skating speed details for a player. */
1976
+ declare function skatingSpeed$1(playerId: PlayerId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeSkaterSkatingSpeed>>;
1977
+ /** Get skater zone time for a player. */
1978
+ declare function zoneTime$1(playerId: PlayerId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeSkaterZoneTime>>;
1979
+ /** Get skater comparison data for a player. */
1980
+ declare function comparison(playerId: PlayerId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeSkaterComparison>>;
1981
+ /** Get skater landing / leaders for a season. */
1982
+ declare function leaders$1(season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeSkaterLanding>>;
1983
+ declare const top10$1: {
1984
+ distance: typeof top10Distance;
1985
+ shotLocation: typeof top10ShotLocation$1;
1986
+ shotSpeed: typeof top10ShotSpeed$1;
1987
+ speed: typeof top10Speed;
1988
+ zoneTime: typeof top10ZoneTime$1;
1989
+ };
1990
+ /** Top-10 skating distance lists. */
1991
+ declare function top10Distance(season?: Season$1, gameType?: GameType, position?: PositionFilter, strength?: SkatersStrength, sortBy?: SkatingDistanceSort): Promise<APIResult<EdgeSkaterDistanceTop10>>;
1992
+ /** Top-10 shot location lists. */
1993
+ declare function top10ShotLocation$1(season?: Season$1, gameType?: GameType, position?: PositionFilter, category?: ShotLocationCategory, sortBy?: ShotLocationSort): Promise<APIResult<EdgeSkaterShotLocationTop10>>;
1994
+ /** Top-10 shot speed lists. */
1995
+ declare function top10ShotSpeed$1(season?: Season$1, gameType?: GameType, position?: PositionFilter, sortBy?: ShotSpeedSort): Promise<APIResult<EdgeSkaterShotSpeedTop10>>;
1996
+ /** Top-10 skating speed lists. */
1997
+ declare function top10Speed(season?: Season$1, gameType?: GameType, position?: PositionFilter, sortBy?: SkatingSpeedSort): Promise<APIResult<EdgeSkaterSpeedTop10>>;
1998
+ /** Top-10 zone time lists. */
1999
+ declare function top10ZoneTime$1(season?: Season$1, gameType?: GameType, position?: PositionFilter, strength?: SkatersStrength, sortBy?: ZoneTimeSort): Promise<APIResult<EdgeSkaterZoneTimeTop10>>;
2000
+
2001
+ declare const skaters$1_comparison: typeof comparison;
2002
+ declare const skaters$1_detail: typeof detail;
2003
+ declare namespace skaters$1 {
2004
+ export { skaters$1_comparison as comparison, skaters$1_detail as detail, leaders$1 as leaders, shotLocation$1 as shotLocation, shotSpeed$1 as shotSpeed, skatingDistance$1 as skatingDistance, skatingSpeed$1 as skatingSpeed, top10$1 as top10, zoneTime$1 as zoneTime };
2005
+ }
2006
+
2007
+ /**
2008
+ * Edge Advanced Stats API helpers.
2009
+ *
2010
+ * Lightweight wrapper exposing functions that call the underlying nhlClient
2011
+ * for related endpoints. Each function resolves to an APIResult; invalid
2012
+ * parameters give a ValidationError result without a request.
2013
+ */
2014
+ /**
2015
+ * Get the "by the numbers" data for the current day, updated daily with
2016
+ * insights from the previous days games.
2017
+ * @returns A promise that resolves to the "by the numbers" data.
2018
+ */
2019
+ declare function byTheNumbers(): Promise<APIResult<EdgeByTheNumbers>>;
2020
+
2021
+ /**
2022
+ * ======================================================================
2023
+ * API endpoints for team-related data.
2024
+ * Base url: api-web.nhle.com/v1/edge
2025
+ *
2026
+ * note: the season and game-type params on any endpoint can
2027
+ * be replaced with 'now' to get current season data.
2028
+ * ex. `/team-detail/{team-id}/now`
2029
+ * ======================================================================
2030
+ */
2031
+
2032
+ /**
2033
+ * Team Edge Advanced Stats API helpers.
2034
+ *
2035
+ * Lightweight wrapper exposing functions that call the underlying nhlClient
2036
+ * for team-related endpoints. Each function resolves to an APIResult; invalid
2037
+ * parameters give a ValidationError result without a request.
2038
+ */
2039
+ /**
2040
+ * Get team detail stats for a team.
2041
+ * @param teamId - Team numeric id.
2042
+ * @param season - Optional season (numeric season format or 'now').
2043
+ * @param gameType - Optional game type id (defaults to Regular Season).
2044
+ */
2045
+ declare function stats$1(teamId: TeamId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeTeamDetail>>;
2046
+ /**
2047
+ * Get team comparison data for a single team.
2048
+ */
2049
+ declare function compare(teamId: TeamId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeTeamComparison>>;
2050
+ /**
2051
+ * Get team landing/leaders for a season.
2052
+ */
2053
+ declare function leaders(season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeTeamLanding>>;
2054
+ /**
2055
+ * Get shot location details for a team.
2056
+ */
2057
+ declare function shotLocation(teamId: TeamId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeTeamShotLocation>>;
2058
+ /**
2059
+ * Get shot speed details for a team.
2060
+ */
2061
+ declare function shotSpeed(teamId: TeamId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeTeamShotSpeed>>;
2062
+ /**
2063
+ * Get skating distance details for a team.
2064
+ */
2065
+ declare function skatingDistance(teamId: TeamId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeTeamSkatingDistance>>;
2066
+ /**
2067
+ * Get skating speed details for a team.
2068
+ */
2069
+ declare function skatingSpeed(teamId: TeamId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeTeamSkatingSpeed>>;
2070
+ /**
2071
+ * Get zone time details for a team.
2072
+ */
2073
+ declare function zoneTime(teamId: TeamId, season?: Season$1, gameType?: GameType): Promise<APIResult<EdgeTeamZoneTime>>;
2074
+ declare const top10: {
2075
+ shotLocation: typeof top10ShotLocation;
2076
+ shotSpeed: typeof top10ShotSpeed;
2077
+ skatingDistance: typeof top10SkatingDistance;
2078
+ skatingSpeed: typeof top10SkatingSpeed;
2079
+ zoneTime: typeof top10ZoneTime;
2080
+ };
2081
+ /**
2082
+ * Top-10 team shot location lists.
2083
+ */
2084
+ declare function top10ShotLocation(season?: Season$1, gameType?: GameType, position?: PositionFilter, category?: ShotLocationCategory, sortBy?: ShotLocationSort): Promise<APIResult<EdgeTeamShotLocationTop10>>;
2085
+ /**
2086
+ * Top-10 team shot speed lists.
2087
+ */
2088
+ declare function top10ShotSpeed(season?: Season$1, gameType?: GameType, position?: PositionFilter, sortBy?: ShotSpeedSort): Promise<APIResult<EdgeTeamShotSpeedTop10>>;
2089
+ /**
2090
+ * Top-10 team skating distance lists.
2091
+ */
2092
+ declare function top10SkatingDistance(season?: Season$1, gameType?: GameType, position?: PositionFilter, strength?: SkatersStrength, sortBy?: SkatingDistanceSort): Promise<APIResult<EdgeTeamSkatingDistanceTop10>>;
2093
+ /**
2094
+ * Top-10 team skating speed lists.
2095
+ */
2096
+ declare function top10SkatingSpeed(season?: Season$1, gameType?: GameType, position?: PositionFilter, sortBy?: SkatingSpeedSort): Promise<APIResult<EdgeTeamSkatingSpeedTop10>>;
2097
+ /**
2098
+ * Top-10 team zone time lists.
2099
+ */
2100
+ declare function top10ZoneTime(season?: Season$1, gameType?: GameType, strength?: SkatersStrength, sortBy?: ZoneTimeSort): Promise<APIResult<EdgeTeamZoneTimeTop10>>;
2101
+
2102
+ declare const teams$1_compare: typeof compare;
2103
+ declare const teams$1_leaders: typeof leaders;
2104
+ declare const teams$1_shotLocation: typeof shotLocation;
2105
+ declare const teams$1_shotSpeed: typeof shotSpeed;
2106
+ declare const teams$1_skatingDistance: typeof skatingDistance;
2107
+ declare const teams$1_skatingSpeed: typeof skatingSpeed;
2108
+ declare const teams$1_top10: typeof top10;
2109
+ declare const teams$1_zoneTime: typeof zoneTime;
2110
+ declare namespace teams$1 {
2111
+ export { teams$1_compare as compare, teams$1_leaders as leaders, teams$1_shotLocation as shotLocation, teams$1_shotSpeed as shotSpeed, teams$1_skatingDistance as skatingDistance, teams$1_skatingSpeed as skatingSpeed, stats$1 as stats, teams$1_top10 as top10, teams$1_zoneTime as zoneTime };
2112
+ }
2113
+
2114
+ /**
2115
+ * ========================================================================
2116
+ * NHL Edge Advanced Stats API Module Exports
2117
+ * Base URL: https://api.nhle.com/stats/rest
2118
+ * ========================================================================
2119
+ * Complete NHL Edge Advanced Stats API implementation with modules for:
2120
+ * - Players (skaters, goalies)
2121
+ * - Teams and franchises
2122
+ * - Advanced statistical numbers
2123
+ * ========================================================================
2124
+ */
2125
+
2126
+ declare const index$2_byTheNumbers: typeof byTheNumbers;
2127
+ declare namespace index$2 {
2128
+ export { index$2_byTheNumbers as byTheNumbers, goalies$1 as goalies, skaters$1 as skaters, teams$1 as teams };
2129
+ }
2130
+
2131
+ /**
2132
+ * ======================================================================
2133
+ * NHL Edge Stats API - Endpoint Paths
2134
+ * Base URL: https://api.nhle.com/stats/rest
2135
+ * ======================================================================
2136
+ * Defines the endpoint paths for all categories of data in the NHL Edge
2137
+ * Stats API. These paths are used by the various API functions to
2138
+ * construct the correct URLs for making requests to the API.
2139
+ *
2140
+ * Note: These endpoints generally return entire datasets (tabular data)
2141
+ * as arrays of objects. The API expects query parameters to be used for
2142
+ * filtering and column selection (namely through cayenneExp). Some
2143
+ * endpoints will return empty arrays or 'not found' errors when queried
2144
+ * without parameters.
2145
+ */
2146
+ declare const dataPaths: {
2147
+ /** Goalie-related statistics and reports. */
2148
+ goalie: {
2149
+ /** Goalie leader boards by stat category. */
2150
+ leaders: {
2151
+ /** Goals-against average leaders. */
2152
+ gaa: string;
2153
+ /** Save percentage leaders. */
2154
+ savePctg: string;
2155
+ /** Shutouts leaders. */
2156
+ shutouts: string;
2157
+ };
2158
+ /** Goalie statistical reports. */
2159
+ report: string;
2160
+ /** Goalie career milestones. */
2161
+ milestones: string;
2162
+ };
2163
+ /** Skater/player-related statistics and reports. */
2164
+ skater: {
2165
+ /** Player directory and information. */
2166
+ players: string;
2167
+ /** Skater leader boards by stat category. */
2168
+ leaders: {
2169
+ /** Assists leaders. */
2170
+ assists: string;
2171
+ /** Goals leaders. */
2172
+ goals: string;
2173
+ /** Points leaders. */
2174
+ points: string;
2175
+ };
2176
+ /** Skater career milestones. */
2177
+ milestones: string;
2178
+ /** Skater statistical reports. */
2179
+ report: string;
2180
+ };
2181
+ /** Team-related statistics and reports. */
2182
+ team: {
2183
+ /** All teams data. */
2184
+ all: string;
2185
+ /** Team data by team ID. */
2186
+ byId: string;
2187
+ /** Team statistical reports. */
2188
+ report: string;
2189
+ };
2190
+ /** Season-related data. */
2191
+ season: string;
2192
+ /** Game-related data. */
2193
+ game: string;
2194
+ /** Draft-related data. */
2195
+ draft: string;
2196
+ /** Configuration data for skater, goalie, and team reports. */
2197
+ config: string;
2198
+ /** Country data. */
2199
+ countries: string;
2200
+ /** Shift chart data. */
2201
+ shiftCharts: string;
2202
+ /** Glossary data. */
2203
+ glossary: string;
2204
+ /** Franchise data. */
2205
+ franchises: string;
2206
+ };
2207
+
2208
+ /**
2209
+ * Response and parameter types for the NHL Stats API
2210
+ * (https://api.nhle.com/stats/rest)
2211
+ *
2212
+ * Every list endpoint answers `{ data: T[], total }`. Report rows (skater,
2213
+ * goalie and team reports) vary with the report and with `isAggregate` /
2214
+ * `isGame`, so their types list the `summary` fields and keep an index
2215
+ * signature for the rest.
2216
+ *
2217
+ * With `isAggregate=true`, report rows drop per-instance fields (seasonId,
2218
+ * teamId, gameId) and team reports add franchise fields; see
2219
+ * TeamStatsWithFranchise.
2220
+ */
2221
+
2222
+ /** List response returned by every Stats API list endpoint */
2223
+ interface PaginatedData<T> {
2224
+ data: T[];
2225
+ /** Number of rows matching the query, before `limit` */
2226
+ total: number;
2227
+ }
2228
+ type APIResultPaginated<T> = APIResult<PaginatedData<T>>;
2229
+ /**
2230
+ * Skater report names listed by `/config` (`playerReportData`).
2231
+ * Any other string is accepted for reports added later.
270
2232
  */
271
- type CountryCode$1 = typeof CountryCode$2.inferIn;
2233
+ type SkaterReport = 'bios' | 'faceoffpercentages' | 'faceoffwins' | 'goalsForAgainst' | 'penalties' | 'penaltyShots' | 'penaltykill' | 'percentages' | 'powerplay' | 'puckPossessions' | 'realtime' | 'scoringRates' | 'scoringpergame' | 'shootout' | 'shottype' | 'summary' | 'summaryshooting' | 'timeonice' | (string & {});
2234
+ /** Goalie report names listed by `/config` (`goalieReportData`) */
2235
+ type GoalieReport = 'advanced' | 'bios' | 'daysrest' | 'penaltyShots' | 'savesByStrength' | 'shootout' | 'startedVsRelieved' | 'summary' | (string & {});
2236
+ /** Team report names listed by `/config` (`teamReportData`) */
2237
+ type TeamReport = 'daysbetweengames' | 'faceoffpercentages' | 'faceoffwins' | 'goalgames' | 'goalsagainstbystrength' | 'goalsagainstbystrengthgoaliepull' | 'goalsbyperiod' | 'goalsforbystrength' | 'goalsforbystrengthgoaliepull' | 'leadingtrailing' | 'outshootoutshotby' | 'penalties' | 'penaltykill' | 'penaltykilltime' | 'percentages' | 'powerplay' | 'powerplaytime' | 'realtime' | 'savePercentage' | 'scoretrailfirst' | 'shootout' | 'shottype' | 'summary' | 'summaryshooting' | (string & {});
2238
+ /** A player as listed by `/players` and nested in leader rows */
2239
+ interface PlayerInfo {
2240
+ id: number;
2241
+ currentTeamId: number | null;
2242
+ firstName: string;
2243
+ fullName: string;
2244
+ lastName: string;
2245
+ positionCode: string;
2246
+ sweaterNumber: number | null;
2247
+ }
2248
+ /** A team logo, included with `include=logos` */
2249
+ interface TeamLogo {
2250
+ id: number;
2251
+ background: string;
2252
+ endSeason: number;
2253
+ secureUrl: string;
2254
+ startSeason: number;
2255
+ teamId: number;
2256
+ url: string;
2257
+ }
2258
+ /** A team as listed by `/team` and `/team/id/{id}` */
2259
+ interface Team$b {
2260
+ id: number;
2261
+ franchiseId: number | null;
2262
+ fullName: string;
2263
+ leagueId: number;
2264
+ rawTricode: string;
2265
+ triCode: string;
2266
+ /** Present with `include=logos`, and on leader rows */
2267
+ logos?: TeamLogo[];
2268
+ }
2269
+ /** Row of a skater report (fields of the `summary` report) */
2270
+ interface SkaterStats {
2271
+ playerId: number;
2272
+ skaterFullName?: string;
2273
+ lastName?: string;
2274
+ seasonId?: number;
2275
+ teamAbbrevs?: string;
2276
+ positionCode?: string;
2277
+ shootsCatches?: string;
2278
+ gamesPlayed?: number;
2279
+ goals?: number;
2280
+ assists?: number;
2281
+ points?: number;
2282
+ plusMinus?: number;
2283
+ pointsPerGame?: number;
2284
+ penaltyMinutes?: number;
2285
+ evGoals?: number;
2286
+ evPoints?: number;
2287
+ ppGoals?: number;
2288
+ ppPoints?: number;
2289
+ shGoals?: number;
2290
+ shPoints?: number;
2291
+ otGoals?: number;
2292
+ gameWinningGoals?: number;
2293
+ shots?: number;
2294
+ shootingPct?: number | null;
2295
+ faceoffWinPct?: number | null;
2296
+ timeOnIcePerGame?: number;
2297
+ [key: string]: unknown;
2298
+ }
2299
+ /** Row of a goalie report (fields of the `summary` report) */
2300
+ interface GoalieStats {
2301
+ playerId: number;
2302
+ goalieFullName?: string;
2303
+ lastName?: string;
2304
+ seasonId?: number;
2305
+ teamAbbrevs?: string;
2306
+ shootsCatches?: string;
2307
+ gamesPlayed?: number;
2308
+ gamesStarted?: number;
2309
+ wins?: number;
2310
+ losses?: number;
2311
+ otLosses?: number | null;
2312
+ ties?: number | null;
2313
+ shutouts?: number;
2314
+ goalsAgainst?: number;
2315
+ goalsAgainstAverage?: number;
2316
+ saves?: number;
2317
+ shotsAgainst?: number;
2318
+ savePct?: number | null;
2319
+ timeOnIce?: number;
2320
+ goals?: number;
2321
+ assists?: number;
2322
+ points?: number;
2323
+ penaltyMinutes?: number;
2324
+ [key: string]: unknown;
2325
+ }
2326
+ /** Row of a team report (fields of the `summary` report) */
2327
+ interface TeamStats$1 {
2328
+ teamId?: number;
2329
+ teamFullName?: string;
2330
+ seasonId?: number;
2331
+ gamesPlayed?: number;
2332
+ wins?: number;
2333
+ losses?: number;
2334
+ otLosses?: number | null;
2335
+ ties?: number | null;
2336
+ points?: number;
2337
+ pointPct?: number;
2338
+ regulationAndOtWins?: number;
2339
+ winsInRegulation?: number;
2340
+ winsInShootout?: number;
2341
+ goalsFor?: number;
2342
+ goalsAgainst?: number;
2343
+ goalsForPerGame?: number;
2344
+ goalsAgainstPerGame?: number;
2345
+ shotsForPerGame?: number;
2346
+ shotsAgainstPerGame?: number;
2347
+ powerPlayPct?: number | null;
2348
+ powerPlayNetPct?: number | null;
2349
+ penaltyKillPct?: number | null;
2350
+ penaltyKillNetPct?: number | null;
2351
+ faceoffWinPct?: number | null;
2352
+ teamShutouts?: number;
2353
+ [key: string]: unknown;
2354
+ }
272
2355
  /**
273
- * Represents a valid country code (e.g., CAN, USA, SWE, ...)
2356
+ * Row of a team report requested with `isAggregate=true`: per-team and
2357
+ * per-season fields are dropped and franchise fields added.
274
2358
  */
275
- type PostalCode = typeof PostalCode$1.inferIn;
2359
+ interface TeamStatsWithFranchise extends TeamStats$1 {
2360
+ franchiseId: number;
2361
+ franchiseName: string;
2362
+ }
2363
+ /** Skater leader row; the stat field is named after the category */
2364
+ interface SkaterLeader$1 {
2365
+ player: PlayerInfo;
2366
+ team: Team$b;
2367
+ goals?: number;
2368
+ assists?: number;
2369
+ points?: number;
2370
+ }
2371
+ /** Goalie leader row; the stat field is named after the category */
2372
+ interface GoalieLeader$1 {
2373
+ player: PlayerInfo;
2374
+ team: Team$b;
2375
+ gaa?: number | null;
2376
+ savePctg?: number | null;
2377
+ shutouts?: number;
2378
+ }
2379
+ /** Shared fields of a milestone row */
2380
+ interface Milestone {
2381
+ id: number;
2382
+ playerId: number;
2383
+ firstName: string;
2384
+ lastName: string;
2385
+ playerFullName: string;
2386
+ currentTeamId: number;
2387
+ teamAbbrev: string;
2388
+ teamCommonName: string;
2389
+ teamFullName: string;
2390
+ teamPlaceName: string;
2391
+ gameTypeId: number;
2392
+ gamesPlayed: number;
2393
+ /** The stat being approached, e.g. "Goals" or "Shutouts" */
2394
+ milestone: string;
2395
+ milestoneAmount: number;
2396
+ }
2397
+ /** A skater approaching a career milestone */
2398
+ interface SkaterMilestone extends Milestone {
2399
+ goals: number;
2400
+ assists: number;
2401
+ points: number;
2402
+ }
2403
+ /** A goalie approaching a career milestone */
2404
+ interface GoalieMilestone extends Milestone {
2405
+ wins: number;
2406
+ so: number;
2407
+ toiMinutes: number;
2408
+ }
2409
+ /** A franchise from `/franchise` */
2410
+ interface Franchise {
2411
+ id: number;
2412
+ fullName: string;
2413
+ teamCommonName: string;
2414
+ teamPlaceName: string;
2415
+ }
2416
+ /** A season from `/season` */
2417
+ interface Season {
2418
+ /** Season id, e.g. 20242025 */
2419
+ id: number;
2420
+ formattedSeasonId: string;
2421
+ seasonOrdinal: number;
2422
+ startDate: string;
2423
+ endDate: string;
2424
+ preseasonStartdate: string | null;
2425
+ regularSeasonEndDate: string;
2426
+ numberOfGames: number;
2427
+ totalRegularSeasonGames: number;
2428
+ totalPlayoffGames: number;
2429
+ allStarGameInUse: number;
2430
+ conferencesInUse: number;
2431
+ divisionsInUse: number;
2432
+ entryDraftInUse: number;
2433
+ nhlStanleyCupOwner: number;
2434
+ olympicsParticipation: number;
2435
+ pointForOTLossInUse: number;
2436
+ rowInUse: number;
2437
+ supplementalDraftInUse: number;
2438
+ tiesInUse: number;
2439
+ wildcardInUse: number;
2440
+ minimumPlayoffMinutesForGoalieStatsLeaders: number;
2441
+ minimumRegularGamesForGoalieStatsLeaders: number;
2442
+ }
2443
+ /** A game from `/game` */
2444
+ interface Game$6 {
2445
+ /** Game id, e.g. 2024020001 */
2446
+ id: number;
2447
+ season: number;
2448
+ /** 1 = preseason, 2 = regular season, 3 = playoffs */
2449
+ gameType: number;
2450
+ gameNumber: number;
2451
+ gameDate: string;
2452
+ easternStartTime: string;
2453
+ gameScheduleStateId: number;
2454
+ gameStateId: number;
2455
+ period: number | null;
2456
+ homeTeamId: number;
2457
+ homeScore: number | null;
2458
+ visitingTeamId: number;
2459
+ visitingScore: number | null;
2460
+ }
2461
+ /** A draft year from `/draft` */
2462
+ interface Draft {
2463
+ id: number;
2464
+ draftYear: number;
2465
+ rounds: number;
2466
+ }
276
2467
  /**
277
- * Represents a valid NHL player ID
2468
+ * Report configuration from `/config`: the columns, filters and sort keys
2469
+ * of every skater, goalie and team report.
278
2470
  */
279
- type PlayerId = typeof PlayerId$1.inferIn;
2471
+ interface Config {
2472
+ playerReportData: Record<string, unknown>;
2473
+ goalieReportData: Record<string, unknown>;
2474
+ teamReportData: Record<string, unknown>;
2475
+ [key: string]: unknown;
2476
+ }
2477
+ /** A country from `/country` */
2478
+ interface Country {
2479
+ /** Three-letter code, same as country3Code */
2480
+ id: string;
2481
+ country3Code: string;
2482
+ countryCode: string;
2483
+ countryName: string;
2484
+ nationalityName: string;
2485
+ iocCode: string | null;
2486
+ hasPlayerStats: number;
2487
+ isActive: number;
2488
+ imageUrl: string | null;
2489
+ thumbnailUrl: string | null;
2490
+ olympicUrl: string | null;
2491
+ }
2492
+ /** One shift (or goal event) from `/shiftcharts` */
2493
+ interface ShiftChart {
2494
+ id: number;
2495
+ gameId: number;
2496
+ playerId: number;
2497
+ firstName: string;
2498
+ lastName: string;
2499
+ teamId: number;
2500
+ teamAbbrev: string;
2501
+ teamName: string;
2502
+ hexValue: string;
2503
+ period: number;
2504
+ shiftNumber: number;
2505
+ startTime: string;
2506
+ endTime: string;
2507
+ duration: string | null;
2508
+ /** 517 = shift, 505 = goal */
2509
+ typeCode: number;
2510
+ detailCode: number;
2511
+ eventNumber: number | null;
2512
+ eventDescription: string | null;
2513
+ eventDetails: string | null;
2514
+ }
2515
+ /** A stat definition from `/glossary` */
2516
+ interface GlossaryEntry {
2517
+ id: number;
2518
+ abbreviation: string;
2519
+ fullName: string;
2520
+ definition: string;
2521
+ firstSeasonForStat: number | null;
2522
+ languageCode: string;
2523
+ lastUpdated: string;
2524
+ }
280
2525
  /**
281
- * Type definitions for enums from constants.ts
2526
+ * Query parameters for Stats API list endpoints
282
2527
  */
283
- /** Categories for shot location top-10 list */
284
- type ShotLocationCategory = keyof typeof ShotLocationCategoryEnum;
285
- /** Sort options for shot location top-10 list */
286
- type ShotLocationSort = keyof typeof ShotLocationSortEnum;
287
- /** Sort options for 5v5 save percentage top-10 list */
288
- type SavePercentage5v5Sort = keyof typeof SavePercentage5v5SortEnum;
289
- /** Sort options for save percentage top-10 list */
290
- type SavePercentageSort = keyof typeof SavePercentageSortEnum;
291
- /** Categories for save location top-10 list */
292
- type SaveLocationCategory = keyof typeof SaveLocationCategoryEnum;
293
- /** Sort options for save location top-10 list */
294
- type SaveLocationSort = keyof typeof SaveLocationSortEnum;
295
- /** Positions filter for player stats */
296
- type PositionFilter = keyof typeof PositionFilterEnum;
297
- /** Strength situation for skater stats */
298
- type SkatersStrength = keyof typeof SkatersStrengthEnum;
299
- /** Sort options for shot speed top-10 list */
300
- type ShotSpeedSort = keyof typeof ShotSpeedSortEnum;
301
- /** Sort options for skating speed top-10 list */
302
- type SkatingSpeedSort = keyof typeof SkatingSpeedSortEnum;
303
- /** Sort options for skating distance top-10 list */
304
- type SkatingDistanceSort = keyof typeof SkatingDistanceSortEnum;
305
- /** Sort options for zone time top-10 lists. */
306
- type ZoneTimeSort = keyof typeof ZoneTimeSortEnum;
2528
+ interface StatsQueryParams extends Record<string, unknown> {
2529
+ /**
2530
+ * Cayenne expression for filtering. Skater and goalie reports fail
2531
+ * (HTTP 500) without one, so the report functions send an empty
2532
+ * expression when none is given.
2533
+ */
2534
+ cayenneExp?: string;
2535
+ /** Sort field, or a JSON array of `{property, direction}` */
2536
+ sort?: string;
2537
+ /** Sort direction: 'asc' or 'desc' */
2538
+ dir?: 'asc' | 'desc';
2539
+ /** Number of results to return; -1 returns all results */
2540
+ limit?: number;
2541
+ /** Starting index for pagination */
2542
+ start?: number;
2543
+ /** Include related data, e.g. 'logos' on teams */
2544
+ include?: string;
2545
+ /** Exclude certain fields */
2546
+ exclude?: string;
2547
+ /** Cayenne expression applied to the underlying facts (e.g. gamesPlayed>=10) */
2548
+ factCayenneExp?: string;
2549
+ /** Aggregate rows across seasons and teams */
2550
+ isAggregate?: boolean;
2551
+ /** Return one row per game */
2552
+ isGame?: boolean;
2553
+ }
2554
+ /** Convenience filters for the `getStatsWithFilters` functions */
2555
+ interface StatsFilters {
2556
+ seasonId?: string | number;
2557
+ gameTypeId?: number;
2558
+ playerId?: number;
2559
+ teamId?: number;
2560
+ /** Any other field, matched with equality */
2561
+ [key: string]: string | number | undefined;
2562
+ }
2563
+ /** Sorting for the `getStatsWithFilters` functions */
2564
+ interface StatsSorting {
2565
+ sortBy?: string;
2566
+ direction?: 'asc' | 'desc';
2567
+ }
2568
+ /** Pagination for the `getStatsWithFilters` functions */
2569
+ interface StatsPagination {
2570
+ limit?: number;
2571
+ start?: number;
2572
+ }
307
2573
 
308
2574
  /**
309
2575
  * ======================================================================
310
- * API endpoints for goalie-related data.
311
- * Base url: api-web.nhle.com/v1/edge
312
- *
313
- * Notes:
314
- * - Convenience endpoints using 'now' for season have been
315
- * excluded in favor of using calculated current season. You can optionally
316
- * configure the switch over date for how current season is calculated.
317
- * See README for details.
318
- * - There is an extra endpoint that appears to duplicate
319
- * the functionality of /skater-detail at `v1/cat/edge/skater-detail`
320
- * As such, it has been excluded from this implementation.
2576
+ * NHL Stats API - Goalie Endpoints
2577
+ * Base URL: https://api.nhle.com/stats/rest
321
2578
  * ======================================================================
2579
+ * Provides functions for retrieving goalie statistics and information
2580
+ * from the NHL Stats API.
322
2581
  */
323
2582
 
324
2583
  /**
325
- * Goalie Edge Advanced Stats API helpers.
2584
+ * Get goalie leaders for a stat category
326
2585
  *
327
- * Lightweight wrapper exposing functions that call the underlying nhlClient
328
- * for goalie-related endpoints. Each method returns the raw Promise from the
329
- * client.get call.
2586
+ * Without a filter the leaders are all-time; filter by season with
2587
+ * `{ cayenneExp: 'season=20242025 and gameType=2' }`.
2588
+ *
2589
+ * @param statCategory - 'gaa', 'savePctg' or 'shutouts'
2590
+ * @param params - Query parameters (the endpoint ignores `limit`)
2591
+ * @param lang - Language code (default: configured language)
2592
+ * @returns Promise resolving to goalie leaders
2593
+ *
2594
+ * @example
2595
+ * const leaders = await stats.goalies.getLeaders('gaa', {
2596
+ * cayenneExp: 'season=20242025 and gameType=2',
2597
+ * });
330
2598
  */
2599
+ declare function getLeaders$1(statCategory: keyof typeof dataPaths.goalie.leaders, params?: StatsQueryParams, lang?: string): Promise<APIResultPaginated<GoalieLeader$1>>;
331
2600
  /**
332
- * Get goalie detail for a player.
333
- * @param playerId - The player's numeric id.
334
- * @param season - Optional season (numeric season format or 'now' via argParse).
335
- * @param gameType - Optional game type id.
336
- * @returns Promise resolving to the raw API response.
2601
+ * Get a goalie report
2602
+ *
2603
+ * @param report - The report name (default: 'summary')
2604
+ * @param params - Query parameters including cayenneExp for filtering
2605
+ * @param lang - Language code (default: configured language)
2606
+ * @returns Promise resolving to goalie statistics
2607
+ *
2608
+ * @example
2609
+ * const result = await stats.goalies.getStats('summary', {
2610
+ * cayenneExp: 'seasonId=20242025 and gameTypeId=2',
2611
+ * sort: 'wins',
2612
+ * dir: 'desc',
2613
+ * limit: 10,
2614
+ * });
337
2615
  */
338
- declare function player$1(playerId: PlayerId, season?: Season, gameType?: GameType): Promise<unknown>;
2616
+ declare function getStats$2(report?: GoalieReport, params?: StatsQueryParams, lang?: string): Promise<APIResultPaginated<GoalieStats>>;
339
2617
  /**
340
- * Get goalie comparison data for a player.
341
- * @param playerId - The player's numeric id.
342
- * @param season - Optional season (numeric season format or 'now' via argParse).
343
- * @param gameType - Optional game type id.
344
- * @returns Promise resolving to the raw API response.
2618
+ * Get goalie stats with low-level query parameters
2619
+ * This is the most flexible approach - you build the query parameters yourself
2620
+ *
2621
+ * @param report - The report name (e.g., 'summary', 'advanced')
2622
+ * @param params - Query parameters including cayenneExp for filtering
2623
+ * @param lang - Language code (default: configured language)
2624
+ * @returns Promise resolving to goalie statistics
2625
+ *
2626
+ * @example
2627
+ * const result = await stats.goalies.getStatsWithParams('summary', {
2628
+ * cayenneExp: 'seasonId=20232024 and gameTypeId=2',
2629
+ * sort: 'wins',
2630
+ * limit: 10,
2631
+ * dir: 'desc',
2632
+ * });
345
2633
  */
346
- declare function compare$1(playerId: PlayerId, season?: Season, gameType?: GameType): Promise<unknown>;
2634
+ declare function getStatsWithParams$2(report: GoalieReport, params: StatsQueryParams, lang?: string): Promise<APIResultPaginated<GoalieStats>>;
347
2635
  /**
348
- * Get goalie landing / leaders for a season.
349
- * @param season - Optional season (numeric season format or 'now' via argParse).
350
- * @param gameType - Optional game type id.
351
- * @returns Promise resolving to the raw API response.
2636
+ * Get goalie stats using a fluent query builder
2637
+ *
2638
+ * @param report - The report name (e.g., 'summary', 'advanced')
2639
+ * @param buildQuery - Function that receives a CayenneQueryBuilder and returns params
2640
+ * @param lang - Language code (default: configured language)
2641
+ * @returns Promise resolving to goalie statistics
2642
+ *
2643
+ * @example
2644
+ * const result = await stats.goalies.getStatsWithBuilder('summary', (q) => ({
2645
+ * cayenneExp: q.equals('seasonId', 20232024).equals('gameTypeId', 2).build(),
2646
+ * sort: 'wins',
2647
+ * limit: 10,
2648
+ * dir: 'desc' as const,
2649
+ * }));
352
2650
  */
353
- declare function leaders$2(season?: Season, gameType?: GameType): Promise<unknown>;
2651
+ declare function getStatsWithBuilder$2(report: GoalieReport, buildQuery: (builder: CayenneQueryBuilder) => StatsQueryParams, lang?: string): Promise<APIResultPaginated<GoalieStats>>;
354
2652
  /**
355
- * Get 5v5 save percentage details for a goalie.
356
- * @param playerId - The player's numeric id.
357
- * @param season - Optional season (numeric season format or 'now' via argParse).
358
- * @param gameType - Optional game type id.
359
- * @returns Promise resolving to the raw API response.
2653
+ * Get goalie stats with high-level convenience parameters
2654
+ * Every filter is matched with equality.
2655
+ *
2656
+ * @param report - The report name (e.g., 'summary', 'advanced')
2657
+ * @param filters - Field filters, e.g. `{ seasonId: 20232024, gameTypeId: 2 }`
2658
+ * @param sorting - Sorting options
2659
+ * @param pagination - Pagination options
2660
+ * @param lang - Language code (default: configured language)
2661
+ * @returns Promise resolving to goalie statistics
2662
+ *
2663
+ * @example
2664
+ * const result = await stats.goalies.getStatsWithFilters(
2665
+ * 'summary',
2666
+ * { seasonId: '20232024', gameTypeId: 2 },
2667
+ * { sortBy: 'wins', direction: 'desc' },
2668
+ * { limit: 10, start: 0 },
2669
+ * );
360
2670
  */
361
- declare function savePercentage5v5(playerId: PlayerId, season?: Season, gameType?: GameType): Promise<unknown>;
2671
+ declare function getStatsWithFilters$2(report: GoalieReport, filters?: StatsFilters, sorting?: StatsSorting, pagination?: StatsPagination, lang?: string): Promise<APIResultPaginated<GoalieStats>>;
362
2672
  /**
363
- * Get save percentage details for a goalie.
364
- * @param playerId - The player's numeric id.
365
- * @param season - Optional season (numeric season format or 'now' via argParse).
366
- * @param gameType - Optional game type id.
367
- * @returns Promise resolving to the raw API response.
2673
+ * Get active goalies approaching a career milestone
2674
+ *
2675
+ * @param lang - Language code (default: configured language)
2676
+ * @returns Promise resolving to goalie milestones
2677
+ *
2678
+ * @example
2679
+ * const milestones = await stats.goalies.getMilestones();
368
2680
  */
369
- declare function savePercentage(playerId: PlayerId, season?: Season, gameType?: GameType): Promise<unknown>;
2681
+ declare function getMilestones$1(lang?: string): Promise<APIResultPaginated<GoalieMilestone>>;
2682
+
2683
+ declare namespace goalies {
2684
+ export { getLeaders$1 as getLeaders, getMilestones$1 as getMilestones, getStats$2 as getStats, getStatsWithBuilder$2 as getStatsWithBuilder, getStatsWithFilters$2 as getStatsWithFilters, getStatsWithParams$2 as getStatsWithParams };
2685
+ }
2686
+
370
2687
  /**
371
- * Get save location details for a goalie.
372
- * @param playerId - The player's numeric id.
373
- * @param season - Optional season (numeric season format or 'now' via argParse).
374
- * @param gameType - Optional game type id.
375
- * @returns Promise resolving to the raw API response.
2688
+ * ======================================================================
2689
+ * NHL Stats API - Miscellaneous Endpoints
2690
+ * Base URL: https://api.nhle.com/stats/rest
2691
+ * ======================================================================
2692
+ * Provides functions for miscellaneous operations including configuration,
2693
+ * country information, shift charts, glossary, and content modules.
376
2694
  */
377
- declare function saveLocation(playerId: PlayerId, season?: Season, gameType?: GameType): Promise<unknown>;
2695
+
378
2696
  /**
379
- * Accessor for top-10 leaderboards.
380
- * @returns Object with methods to fetch various top-10 lists.
2697
+ * Get configuration information
2698
+ *
2699
+ * @param lang - Language code (default: configured language)
2700
+ * @returns Promise resolving to configuration data
2701
+ *
2702
+ * @example
2703
+ * const config = await getConfig('en');
381
2704
  */
382
- declare const top10$2: {
383
- savePercentage: typeof top10SavePercentage;
384
- savePercentage5v5: typeof top10SavePercentage5v5;
385
- saveLocation: typeof top10SaveLocation;
386
- };
2705
+ declare function getConfig(lang?: string): Promise<APIResult<Config>>;
387
2706
  /**
388
- * Top-10 edge save percentage lists.
389
- * @param sortBy - Sorting key for the leaderboard.
390
- * @param season - Optional season (numeric or 'now').
391
- * @param gameType - Optional game type id.
392
- * @returns Promise resolving to the raw API response.
2707
+ * Get country information
2708
+ * Returns list of all countries with a hockey presence
2709
+ *
2710
+ * @param lang - Language code (default: configured language)
2711
+ * @returns Promise resolving to country data
2712
+ *
2713
+ * @example
2714
+ * const countries = await getCountries('en');
393
2715
  */
394
- declare function top10SavePercentage(season?: Season, gameType?: GameType, sortBy?: SavePercentageSort): Promise<unknown>;
2716
+ declare function getCountries(lang?: string): Promise<APIResultPaginated<Country>>;
395
2717
  /**
396
- * Top-10 5v5 save percentage lists.
397
- * @param sortBy - Sorting key for the leaderboard.
398
- * @param season - Optional season (numeric or 'now').
399
- * @param gameType - Optional game type id.
400
- * @returns Promise resolving to the raw API response.
2718
+ * Get the glossary for a specific language
2719
+ *
2720
+ * @param lang - Language code (default: configured language)
2721
+ * @returns Promise resolving to glossary data
2722
+ *
2723
+ * @example
2724
+ * const glossary = await glossary.get('en');
401
2725
  */
402
- declare function top10SavePercentage5v5(season?: Season, gameType?: GameType, sortBy?: SavePercentage5v5Sort): Promise<unknown>;
2726
+ declare function getGlossary(lang?: string): Promise<APIResultPaginated<GlossaryEntry>>;
403
2727
  /**
404
- * Top-10 save location lists.
405
- * @param category - Category key (see SaveLocationCategoryEnum).
406
- * @param sortBy - Sorting key for the leaderboard (see SaveLocationSortEnum).
407
- * @param season - Optional season (e.g. 20242025).
408
- * @param gameType - Optional game type.
409
- * @returns Promise resolving to the raw API response.
2728
+ * Get franchise information
2729
+ *
2730
+ * @param lang - Language code (default: configured language)
2731
+ * @returns Promise resolving to franchise data
2732
+ *
2733
+ * @example
2734
+ * const allFranchises = await getFranchises('en');
410
2735
  */
411
- declare function top10SaveLocation(season?: Season, gameType?: GameType, category?: SaveLocationCategory, sortBy?: SaveLocationSort): Promise<unknown>;
2736
+ declare function getFranchises(lang?: string): Promise<APIResultPaginated<Franchise>>;
412
2737
 
413
- declare const goalies_saveLocation: typeof saveLocation;
414
- declare const goalies_savePercentage: typeof savePercentage;
415
- declare const goalies_savePercentage5v5: typeof savePercentage5v5;
416
- declare namespace goalies {
417
- export { compare$1 as compare, leaders$2 as leaders, player$1 as player, goalies_saveLocation as saveLocation, goalies_savePercentage as savePercentage, goalies_savePercentage5v5 as savePercentage5v5, top10$2 as top10 };
2738
+ declare const misc$1_getConfig: typeof getConfig;
2739
+ declare const misc$1_getCountries: typeof getCountries;
2740
+ declare const misc$1_getFranchises: typeof getFranchises;
2741
+ declare const misc$1_getGlossary: typeof getGlossary;
2742
+ declare namespace misc$1 {
2743
+ export { misc$1_getConfig as getConfig, misc$1_getCountries as getCountries, misc$1_getFranchises as getFranchises, misc$1_getGlossary as getGlossary };
418
2744
  }
419
2745
 
420
2746
  /**
421
2747
  * ======================================================================
422
- * API endpoints for skater-related data.
423
- * Base url: api-web.nhle.com/v1/edge
424
- *
425
- * Notes:
426
- * - Convenience endpoints using 'now' for season have been
427
- * excluded in favor of using calculated current season. You can optionally
428
- * configure the switch over date for how current season is calculated.
429
- * See README for details.
430
- * - There is an extra endpoint that appears to duplicate
431
- * the functionality of /skater-detail at `v1/cat/edge/skater-detail`
432
- * As such, it has been excluded from this implementation.
433
- * =====================================================================
2748
+ * NHL Stats API - Season and Game Endpoints
2749
+ * Base URL: https://api.nhle.com/stats/rest
2750
+ * ======================================================================
2751
+ * Provides functions for retrieving season and game information
2752
+ * from the NHL Stats API.
434
2753
  */
435
2754
 
436
2755
  /**
437
- * Skater Edge Advanced Stats API helpers.
2756
+ * Get every season's settings (dates, game counts, rules in use)
438
2757
  *
439
- * Lightweight wrapper exposing functions that call the underlying nhlClient
440
- * for skater-related endpoints. Each method returns the raw Promise from the
441
- * client.get call.
2758
+ * @param lang - Language code (default: configured language)
2759
+ * @returns Promise resolving to season data
2760
+ *
2761
+ * @example
2762
+ * const seasons = await stats.season.getSeasons();
442
2763
  */
443
- /** Get skater detail for a player. */
444
- declare function detail(playerId: PlayerId, season?: Season, gameType?: GameType): Promise<unknown>;
445
- /** Get skater shot location details for a player. */
446
- declare function shotLocation$1(playerId: PlayerId, season?: Season, gameType?: GameType): Promise<unknown>;
447
- /** Get skater shot speed details for a player. */
448
- declare function shotSpeed$1(playerId: PlayerId, season?: Season, gameType?: GameType): Promise<unknown>;
449
- /** Get skater skating distance details for a player. */
450
- declare function skatingDistance$1(playerId: PlayerId, season?: Season, gameType?: GameType): Promise<unknown>;
451
- /** Get skater skating speed details for a player. */
452
- declare function skatingSpeed$1(playerId: PlayerId, season?: Season, gameType?: GameType): Promise<unknown>;
453
- /** Get skater zone time for a player. */
454
- declare function zoneTime$1(playerId: PlayerId, season?: Season, gameType?: GameType): Promise<unknown>;
455
- /** Get skater comparison data for a player. */
456
- declare function comparison(playerId: PlayerId, season?: Season, gameType?: GameType): Promise<unknown>;
457
- /** Get skater landing / leaders for a season. */
458
- declare function leaders$1(season?: Season, gameType?: GameType): Promise<unknown>;
459
- declare const top10$1: {
460
- distance: typeof top10Distance;
461
- shotLocation: typeof top10ShotLocation$1;
462
- shotSpeed: typeof top10ShotSpeed$1;
463
- speed: typeof top10Speed;
464
- zoneTime: typeof top10ZoneTime$1;
465
- };
466
- /** Top-10 skating distance lists. */
467
- declare function top10Distance(season?: Season, gameType?: GameType, position?: PositionFilter, strength?: SkatersStrength, sortBy?: SkatingDistanceSort): Promise<unknown>;
468
- /** Top-10 shot location lists. */
469
- declare function top10ShotLocation$1(season?: Season, gameType?: GameType, position?: PositionFilter, category?: ShotLocationCategory, sortBy?: ShotLocationSort): Promise<unknown>;
470
- /** Top-10 shot speed lists. */
471
- declare function top10ShotSpeed$1(season?: Season, gameType?: GameType, position?: PositionFilter, sortBy?: ShotSpeedSort): Promise<unknown>;
472
- /** Top-10 skating speed lists. */
473
- declare function top10Speed(season?: Season, gameType?: GameType, position?: PositionFilter, sortBy?: SkatingSpeedSort): Promise<unknown>;
474
- /** Top-10 zone time lists. */
475
- declare function top10ZoneTime$1(season?: Season, gameType?: GameType, position?: PositionFilter, strength?: SkatersStrength, sortBy?: ZoneTimeSort): Promise<unknown>;
476
-
477
- declare const skaters_comparison: typeof comparison;
478
- declare const skaters_detail: typeof detail;
479
- declare namespace skaters {
480
- export { skaters_comparison as comparison, skaters_detail as detail, leaders$1 as leaders, shotLocation$1 as shotLocation, shotSpeed$1 as shotSpeed, skatingDistance$1 as skatingDistance, skatingSpeed$1 as skatingSpeed, top10$1 as top10, zoneTime$1 as zoneTime };
481
- }
482
-
2764
+ declare function getSeasons(lang?: string): Promise<APIResultPaginated<Season>>;
483
2765
  /**
484
- * NHL API Client Type Definitions
2766
+ * Get games
2767
+ *
2768
+ * Without a filter this downloads every game since 1917 (about 19 MB),
2769
+ * so filter by season or date.
2770
+ *
2771
+ * @param params - Query parameters, e.g. `{ cayenneExp: 'season=20242025 and gameType=2' }`
2772
+ * @param lang - Language code (default: configured language)
2773
+ * @returns Promise resolving to game data
2774
+ *
2775
+ * @example
2776
+ * const games = await stats.season.getGames({
2777
+ * cayenneExp: 'gameDate="2025-01-15"',
2778
+ * });
485
2779
  */
486
-
487
- type APIResponse<T> = {
488
- success: true;
489
- data: T;
490
- } | {
491
- success: false;
492
- error: NHLError;
493
- };
494
-
2780
+ declare function getGames(params?: StatsQueryParams, lang?: string): Promise<APIResultPaginated<Game$6>>;
495
2781
  /**
496
- * Edge Advanced Stats API helpers.
2782
+ * Get every shift (and goal event) of a game
497
2783
  *
498
- * Lightweight wrapper exposing functions that call the underlying nhlClient
499
- * for related endpoints. Each method returns the raw Promise from the
500
- * client.get call.
2784
+ * @param gameId - The game ID
2785
+ * @param lang - Language code (default: configured language)
2786
+ * @returns Promise resolving to shift chart data
2787
+ *
2788
+ * @example
2789
+ * const shifts = await stats.season.getShiftChart(2024020500);
501
2790
  */
2791
+ declare function getShiftChart(gameId: string | number, lang?: string): Promise<APIResultPaginated<ShiftChart>>;
502
2792
  /**
503
- * Get the "by the numbers" data for the current day, updated daily with
504
- * insights from the previous days games.
505
- * @returns A promise that resolves to the "by the numbers" data.
2793
+ * Get the draft years and their number of rounds
2794
+ *
2795
+ * @param lang - Language code (default: configured language)
2796
+ * @returns Promise resolving to draft data
2797
+ *
2798
+ * @example
2799
+ * const drafts = await stats.season.getDraft();
506
2800
  */
507
- declare function byTheNumbers(): Promise<APIResponse<unknown>>;
2801
+ declare function getDraft(lang?: string): Promise<APIResultPaginated<Draft>>;
2802
+
2803
+ declare const seasonGame_getDraft: typeof getDraft;
2804
+ declare const seasonGame_getGames: typeof getGames;
2805
+ declare const seasonGame_getSeasons: typeof getSeasons;
2806
+ declare const seasonGame_getShiftChart: typeof getShiftChart;
2807
+ declare namespace seasonGame {
2808
+ export { seasonGame_getDraft as getDraft, seasonGame_getGames as getGames, seasonGame_getSeasons as getSeasons, seasonGame_getShiftChart as getShiftChart };
2809
+ }
508
2810
 
509
2811
  /**
510
2812
  * ======================================================================
511
- * API endpoints for team-related data.
512
- * Base url: api-web.nhle.com/v1/edge
513
- *
514
- * note: the season and game-type params on any endpoint can
515
- * be replaced with 'now' to get current season data.
516
- * ex. `/team-detail/{team-id}/now`
2813
+ * NHL Stats API - Skater Endpoints
2814
+ * Base URL: https://api.nhle.com/stats/rest
517
2815
  * ======================================================================
2816
+ * Provides functions for retrieving skater (player) statistics and information
2817
+ * from the NHL Stats API.
518
2818
  */
519
2819
 
520
2820
  /**
521
- * Team Edge Advanced Stats API helpers.
2821
+ * Look up players (skaters and goalies)
522
2822
  *
523
- * Lightweight wrapper exposing functions that call the underlying nhlClient
524
- * for team-related endpoints. Each method returns the raw Promise from the
525
- * client.get call.
2823
+ * The endpoint returns nothing without a filter, so pass a `cayenneExp`.
2824
+ *
2825
+ * @param params - Query parameters, e.g. `{ cayenneExp: 'id=8478402' }`
2826
+ * @param lang - Language code (default: configured language)
2827
+ * @returns Promise resolving to matching players
2828
+ *
2829
+ * @example
2830
+ * const players = await stats.skaters.getPlayerInfo({
2831
+ * cayenneExp: 'lastName="McDavid"',
2832
+ * });
526
2833
  */
2834
+ declare function getPlayerInfo(params?: StatsQueryParams, lang?: string): Promise<APIResultPaginated<PlayerInfo>>;
527
2835
  /**
528
- * Get team detail stats for a team.
529
- * @param teamId - Team numeric id.
530
- * @param season - Optional season (numeric season format or 'now').
531
- * @param gameType - Optional game type id (defaults to Regular Season).
2836
+ * Get skater leaders for a stat category
2837
+ *
2838
+ * Without a filter the leaders are all-time; filter by season with
2839
+ * `{ cayenneExp: 'season=20242025 and gameType=2' }`.
2840
+ *
2841
+ * @param statCategory - 'points', 'goals' or 'assists'
2842
+ * @param params - Query parameters (the endpoint ignores `limit`)
2843
+ * @param lang - Language code (default: configured language)
2844
+ * @returns Promise resolving to skater leaders
2845
+ *
2846
+ * @example
2847
+ * const leaders = await stats.skaters.getLeaders('points', {
2848
+ * cayenneExp: 'season=20242025 and gameType=2',
2849
+ * });
532
2850
  */
533
- declare function stats$1(teamId: TeamId, season?: Season, gameType?: GameType): Promise<unknown>;
2851
+ declare function getLeaders(statCategory: keyof typeof dataPaths.skater.leaders, params?: StatsQueryParams, lang?: string): Promise<APIResultPaginated<SkaterLeader$1>>;
534
2852
  /**
535
- * Get team comparison data for a single team.
2853
+ * Get active skaters approaching a career milestone
2854
+ *
2855
+ * @param lang - Language code (default: configured language)
2856
+ * @returns Promise resolving to skater milestones
2857
+ *
2858
+ * @example
2859
+ * const milestones = await stats.skaters.getMilestones();
536
2860
  */
537
- declare function compare(teamId: TeamId, season?: Season, gameType?: GameType): Promise<unknown>;
2861
+ declare function getMilestones(lang?: string): Promise<APIResultPaginated<SkaterMilestone>>;
538
2862
  /**
539
- * Get team landing/leaders for a season.
2863
+ * Get a skater report
2864
+ *
2865
+ * @param report - The report name (default: 'summary')
2866
+ * @param params - Query parameters including cayenneExp for filtering
2867
+ * @param lang - Language code (default: configured language)
2868
+ * @returns Promise resolving to skater statistics
2869
+ *
2870
+ * @example
2871
+ * const result = await stats.skaters.getStats('summary', {
2872
+ * cayenneExp: 'seasonId=20242025 and gameTypeId=2',
2873
+ * sort: 'points',
2874
+ * dir: 'desc',
2875
+ * limit: 10,
2876
+ * });
540
2877
  */
541
- declare function leaders(season?: Season, gameType?: GameType): Promise<unknown>;
2878
+ declare function getStats$1(report?: SkaterReport, params?: StatsQueryParams, lang?: string): Promise<APIResultPaginated<SkaterStats>>;
542
2879
  /**
543
- * Get shot location details for a team.
2880
+ * Get skater stats with low-level query parameters
2881
+ * This is the most flexible approach - you build the query parameters yourself
2882
+ *
2883
+ * @param report - The report name (e.g., 'summary', 'realtime')
2884
+ * @param params - Query parameters including cayenneExp for filtering
2885
+ * @param lang - Language code (default: configured language)
2886
+ * @returns Promise resolving to skater statistics
2887
+ *
2888
+ * @example
2889
+ * const result = await stats.skaters.getStatsWithParams('summary', {
2890
+ * cayenneExp: 'seasonId=20232024 and gameTypeId=2',
2891
+ * sort: 'points',
2892
+ * limit: 10,
2893
+ * dir: 'desc',
2894
+ * });
544
2895
  */
545
- declare function shotLocation(teamId: TeamId, season?: Season, gameType?: GameType): Promise<unknown>;
2896
+ declare function getStatsWithParams$1(report: SkaterReport, params: StatsQueryParams, lang?: string): Promise<APIResultPaginated<SkaterStats>>;
546
2897
  /**
547
- * Get shot speed details for a team.
2898
+ * Get skater stats using a fluent query builder
2899
+ *
2900
+ * @param report - The report name (e.g., 'summary', 'realtime')
2901
+ * @param buildQuery - Function that receives a CayenneQueryBuilder and returns params
2902
+ * @param lang - Language code (default: configured language)
2903
+ * @returns Promise resolving to skater statistics
2904
+ *
2905
+ * @example
2906
+ * const result = await stats.skaters.getStatsWithBuilder('summary', (q) => ({
2907
+ * cayenneExp: q.equals('seasonId', 20232024).equals('gameTypeId', 2).build(),
2908
+ * sort: 'points',
2909
+ * limit: 10,
2910
+ * dir: 'desc' as const,
2911
+ * }));
548
2912
  */
549
- declare function shotSpeed(teamId: TeamId, season?: Season, gameType?: GameType): Promise<unknown>;
2913
+ declare function getStatsWithBuilder$1(report: SkaterReport, buildQuery: (builder: CayenneQueryBuilder) => StatsQueryParams, lang?: string): Promise<APIResultPaginated<SkaterStats>>;
550
2914
  /**
551
- * Get skating distance details for a team.
2915
+ * Get skater stats with high-level convenience parameters
2916
+ * Every filter is matched with equality.
2917
+ *
2918
+ * @param report - The report name (e.g., 'summary', 'realtime')
2919
+ * @param filters - Field filters, e.g. `{ seasonId: 20232024, gameTypeId: 2 }`
2920
+ * @param sorting - Sorting options
2921
+ * @param pagination - Pagination options
2922
+ * @param lang - Language code (default: configured language)
2923
+ * @returns Promise resolving to skater statistics
2924
+ *
2925
+ * @example
2926
+ * const result = await stats.skaters.getStatsWithFilters(
2927
+ * 'summary',
2928
+ * { seasonId: '20232024', gameTypeId: 2 },
2929
+ * { sortBy: 'points', direction: 'desc' },
2930
+ * { limit: 10, start: 0 },
2931
+ * );
552
2932
  */
553
- declare function skatingDistance(teamId: TeamId, season?: Season, gameType?: GameType): Promise<unknown>;
2933
+ declare function getStatsWithFilters$1(report: SkaterReport, filters?: StatsFilters, sorting?: StatsSorting, pagination?: StatsPagination, lang?: string): Promise<APIResultPaginated<SkaterStats>>;
2934
+
2935
+ declare const skaters_getLeaders: typeof getLeaders;
2936
+ declare const skaters_getMilestones: typeof getMilestones;
2937
+ declare const skaters_getPlayerInfo: typeof getPlayerInfo;
2938
+ declare namespace skaters {
2939
+ export { skaters_getLeaders as getLeaders, skaters_getMilestones as getMilestones, skaters_getPlayerInfo as getPlayerInfo, getStats$1 as getStats, getStatsWithBuilder$1 as getStatsWithBuilder, getStatsWithFilters$1 as getStatsWithFilters, getStatsWithParams$1 as getStatsWithParams };
2940
+ }
2941
+
554
2942
  /**
555
- * Get skating speed details for a team.
2943
+ * ======================================================================
2944
+ * NHL Stats API - Team Endpoints
2945
+ * Base URL: https://api.nhle.com/stats/rest
2946
+ * ======================================================================
2947
+ * Provides functions for retrieving team statistics and information
2948
+ * from the NHL Stats API.
556
2949
  */
557
- declare function skatingSpeed(teamId: TeamId, season?: Season, gameType?: GameType): Promise<unknown>;
2950
+
558
2951
  /**
559
- * Get zone time details for a team.
2952
+ * Get every team, past and present
2953
+ *
2954
+ * @param params - Query parameters, e.g. `{ include: 'logos' }`
2955
+ * @param lang - Language code (default: configured language)
2956
+ * @returns Promise resolving to the team list
2957
+ *
2958
+ * @example
2959
+ * const allTeams = await stats.teams.getAll();
560
2960
  */
561
- declare function zoneTime(teamId: TeamId, season?: Season, gameType?: GameType): Promise<unknown>;
562
- declare const top10: {
563
- shotLocation: typeof top10ShotLocation;
564
- shotSpeed: typeof top10ShotSpeed;
565
- skatingDistance: typeof top10SkatingDistance;
566
- skatingSpeed: typeof top10SkatingSpeed;
567
- zoneTime: typeof top10ZoneTime;
568
- };
2961
+ declare function getAll(params?: StatsQueryParams, lang?: string): Promise<APIResultPaginated<Team$b>>;
569
2962
  /**
570
- * Top-10 team shot location lists.
2963
+ * Get a team by ID
2964
+ *
2965
+ * The API answers with a one-row list.
2966
+ *
2967
+ * @param teamId - The team ID
2968
+ * @param params - Query parameters, e.g. `{ include: 'logos' }`
2969
+ * @param lang - Language code (default: configured language)
2970
+ * @returns Promise resolving to a list holding the team
2971
+ *
2972
+ * @example
2973
+ * const result = await stats.teams.getById(10);
2974
+ * if (result.success) console.log(result.data.data[0]?.fullName);
571
2975
  */
572
- declare function top10ShotLocation(season?: Season, gameType?: GameType, position?: PositionFilter, category?: ShotLocationCategory, sortBy?: ShotLocationSort): Promise<unknown>;
2976
+ declare function getById(teamId: number, params?: StatsQueryParams, lang?: string): Promise<APIResultPaginated<Team$b>>;
573
2977
  /**
574
- * Top-10 team shot speed lists.
2978
+ * Get a team report
2979
+ *
2980
+ * @param report - The report name (default: 'summary')
2981
+ * @param params - Query parameters including cayenneExp for filtering
2982
+ * @param lang - Language code (default: configured language)
2983
+ * @returns Promise resolving to team statistics
2984
+ *
2985
+ * @example
2986
+ * const result = await stats.teams.getStats('summary', {
2987
+ * cayenneExp: 'seasonId=20242025 and gameTypeId=2',
2988
+ * sort: 'points',
2989
+ * dir: 'desc',
2990
+ * });
575
2991
  */
576
- declare function top10ShotSpeed(season?: Season, gameType?: GameType, position?: PositionFilter, sortBy?: ShotSpeedSort): Promise<unknown>;
2992
+ declare function getStats(report?: TeamReport, params?: StatsQueryParams, lang?: string): Promise<APIResultPaginated<TeamStats$1>>;
577
2993
  /**
578
- * Top-10 team skating distance lists.
2994
+ * Get team stats with low-level query parameters
2995
+ * This is the most flexible approach - you build the query parameters yourself
2996
+ *
2997
+ * @param report - The report name (e.g., 'summary', 'powerplay')
2998
+ * @param params - Query parameters including cayenneExp for filtering
2999
+ * @param lang - Language code (default: configured language)
3000
+ * @returns Promise resolving to team statistics
3001
+ *
3002
+ * @example
3003
+ * const result = await stats.teams.getStatsWithParams('summary', {
3004
+ * cayenneExp: 'seasonId=20232024 and gameTypeId=2',
3005
+ * sort: 'shotsForPerGame',
3006
+ * });
579
3007
  */
580
- declare function top10SkatingDistance(season?: Season, gameType?: GameType, position?: PositionFilter, strength?: SkatersStrength, sortBy?: SkatingDistanceSort): Promise<unknown>;
3008
+ declare function getStatsWithParams(report: TeamReport, params: StatsQueryParams, lang?: string): Promise<APIResultPaginated<TeamStats$1>>;
581
3009
  /**
582
- * Top-10 team skating speed lists.
3010
+ * Get team stats using a fluent query builder
3011
+ *
3012
+ * @param report - The report name (e.g., 'summary', 'powerplay')
3013
+ * @param buildQuery - Function that receives a CayenneQueryBuilder and returns params
3014
+ * @param lang - Language code (default: configured language)
3015
+ * @returns Promise resolving to team statistics
3016
+ *
3017
+ * @example
3018
+ * const result = await stats.teams.getStatsWithBuilder('summary', (q) => ({
3019
+ * cayenneExp: q.equals('seasonId', 20232024).equals('gameTypeId', 2).build(),
3020
+ * sort: 'shotsForPerGame',
3021
+ * limit: 10,
3022
+ * dir: 'desc' as const,
3023
+ * }));
583
3024
  */
584
- declare function top10SkatingSpeed(season?: Season, gameType?: GameType, position?: PositionFilter, sortBy?: SkatingSpeedSort): Promise<unknown>;
3025
+ declare function getStatsWithBuilder(report: TeamReport, buildQuery: (builder: CayenneQueryBuilder) => StatsQueryParams, lang?: string): Promise<APIResultPaginated<TeamStats$1>>;
585
3026
  /**
586
- * Top-10 team zone time lists.
3027
+ * Get team stats with high-level convenience parameters
3028
+ * Every filter is matched with equality.
3029
+ *
3030
+ * @param report - The report name (e.g., 'summary', 'powerplay')
3031
+ * @param filters - Field filters, e.g. `{ seasonId: 20232024, gameTypeId: 2 }`
3032
+ * @param sorting - Sorting options
3033
+ * @param pagination - Pagination options
3034
+ * @param lang - Language code (default: configured language)
3035
+ * @returns Promise resolving to team statistics
3036
+ *
3037
+ * @example
3038
+ * const result = await stats.teams.getStatsWithFilters(
3039
+ * 'summary',
3040
+ * { seasonId: '20232024', gameTypeId: 2 },
3041
+ * { sortBy: 'shotsForPerGame', direction: 'desc' },
3042
+ * { limit: 10, start: 0 },
3043
+ * );
587
3044
  */
588
- declare function top10ZoneTime(season?: Season, gameType?: GameType, strength?: SkatersStrength, sortBy?: ZoneTimeSort): Promise<unknown>;
3045
+ declare function getStatsWithFilters(report: TeamReport, filters?: StatsFilters, sorting?: StatsSorting, pagination?: StatsPagination, lang?: string): Promise<APIResultPaginated<TeamStats$1>>;
589
3046
 
590
- declare const teams_compare: typeof compare;
591
- declare const teams_leaders: typeof leaders;
592
- declare const teams_shotLocation: typeof shotLocation;
593
- declare const teams_shotSpeed: typeof shotSpeed;
594
- declare const teams_skatingDistance: typeof skatingDistance;
595
- declare const teams_skatingSpeed: typeof skatingSpeed;
596
- declare const teams_top10: typeof top10;
597
- declare const teams_zoneTime: typeof zoneTime;
3047
+ declare const teams_getAll: typeof getAll;
3048
+ declare const teams_getById: typeof getById;
3049
+ declare const teams_getStats: typeof getStats;
3050
+ declare const teams_getStatsWithBuilder: typeof getStatsWithBuilder;
3051
+ declare const teams_getStatsWithFilters: typeof getStatsWithFilters;
3052
+ declare const teams_getStatsWithParams: typeof getStatsWithParams;
598
3053
  declare namespace teams {
599
- export { teams_compare as compare, teams_leaders as leaders, teams_shotLocation as shotLocation, teams_shotSpeed as shotSpeed, teams_skatingDistance as skatingDistance, teams_skatingSpeed as skatingSpeed, stats$1 as stats, teams_top10 as top10, teams_zoneTime as zoneTime };
3054
+ export { teams_getAll as getAll, teams_getById as getById, teams_getStats as getStats, teams_getStatsWithBuilder as getStatsWithBuilder, teams_getStatsWithFilters as getStatsWithFilters, teams_getStatsWithParams as getStatsWithParams };
600
3055
  }
601
3056
 
602
3057
  /**
603
- * ========================================================================
604
- * NHL Edge Advanced Stats API Module Exports
3058
+ * ======================================================================
3059
+ * NHL Stats API Module Exports
605
3060
  * Base URL: https://api.nhle.com/stats/rest
606
- * ========================================================================
607
- * Complete NHL Edge Advanced Stats API implementation with modules for:
608
- * - Players (skaters, goalies)
3061
+ * ======================================================================
3062
+ * Complete NHL Stats API implementation with modules for:
3063
+ * - Players (skaters, goalies, draft info)
609
3064
  * - Teams and franchises
610
- * - Advanced statistical numbers
611
- * ========================================================================
3065
+ * - Seasons and games
3066
+ * - Miscellaneous (config, shifts, glossary, etc.)
612
3067
  */
613
3068
 
614
- declare const index$1_byTheNumbers: typeof byTheNumbers;
3069
+ type index$1_APIResultPaginated<T> = APIResultPaginated<T>;
3070
+ type index$1_Config = Config;
3071
+ type index$1_Country = Country;
3072
+ type index$1_Draft = Draft;
3073
+ type index$1_Franchise = Franchise;
3074
+ type index$1_GlossaryEntry = GlossaryEntry;
3075
+ type index$1_GoalieMilestone = GoalieMilestone;
3076
+ type index$1_GoalieReport = GoalieReport;
3077
+ type index$1_GoalieStats = GoalieStats;
3078
+ type index$1_PaginatedData<T> = PaginatedData<T>;
3079
+ type index$1_PlayerInfo = PlayerInfo;
3080
+ type index$1_Season = Season;
3081
+ type index$1_ShiftChart = ShiftChart;
3082
+ type index$1_SkaterMilestone = SkaterMilestone;
3083
+ type index$1_SkaterReport = SkaterReport;
3084
+ type index$1_SkaterStats = SkaterStats;
3085
+ type index$1_StatsFilters = StatsFilters;
3086
+ type index$1_StatsPagination = StatsPagination;
3087
+ type index$1_StatsQueryParams = StatsQueryParams;
3088
+ type index$1_StatsSorting = StatsSorting;
3089
+ type index$1_TeamLogo = TeamLogo;
3090
+ type index$1_TeamReport = TeamReport;
3091
+ type index$1_TeamStatsWithFranchise = TeamStatsWithFranchise;
615
3092
  declare const index$1_goalies: typeof goalies;
616
3093
  declare const index$1_skaters: typeof skaters;
617
3094
  declare const index$1_teams: typeof teams;
618
3095
  declare namespace index$1 {
619
- export { index$1_byTheNumbers as byTheNumbers, index$1_goalies as goalies, index$1_skaters as skaters, index$1_teams as teams };
620
- }
621
-
622
- /**
623
- * Common types used in Gamecenter API responses
624
- */
625
- /** The current state of the game. */
626
- type GameState = 'OFF' | 'FUT' | 'LIVE' | 'PRE' | 'CRIT' | 'FINAL';
627
- /** The current state of the game. */
628
- type GameScheduleState = 'OK' | 'TBD' | 'CNCL' | (string & {});
629
- /** The type of period in the game. */
630
- type PeriodType = 'REG' | 'OT' | 'SO';
631
- /** Abbreviated day of the week. (MON = Monday, TUE = Tuesday ...) */
632
- type DayAbbrev = 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT' | 'SUN';
633
- /** The type of penalty. (MIN = Minor, BEN = Bench, MAJ = Major ...) */
634
- type PenaltyTypeCode = 'MIN' | 'BEN' | 'MAJ' | (string & {});
635
- /** The market for this broadcast. (H = Home, A = Away, N = National, S = Satellite Radio) */
636
- type Market = 'H' | 'A' | 'N' | 'S';
637
- /** The country code for this broadcast. (CA = Canada, US = United States) */
638
- type CountryCode = 'CA' | 'US';
639
- /** The position code for a player. (C = Center, L[W] = Left Wing, R[W] = Right Wing, D = Defenseman, G = Goalie) */
640
- type PositionCode = 'C' | 'LW' | 'L' | 'RW' | 'R' | 'D' | 'G';
641
- /** Player's shooting/catching handedness. (L = Left, R = Right) */
642
- type ShootsCatches = 'L' | 'R';
643
- type HexColorCode = `#${string}`;
644
- type UTCOffset = `+${number}:${number}` | `-${number}:${number}`;
645
- type GoalModifier = 'none' | 'empty-net' | 'awarded-empty-net';
646
- type DefendingSide = 'left' | 'right';
647
- type Strength = 'ev' | 'pp' | 'sh';
648
- type ZoneCode = 'N' | 'D' | 'O';
649
- type ShotType = 'backhand' | 'bat' | 'between-legs' | 'deflected' | 'poke' | 'slap' | 'snap' | 'tip-in' | 'wrap-around' | 'wrist' | (string & {});
650
- type PenaltyDescKey = 'tripping' | 'hooking' | 'interference' | 'high-sticking' | 'roughing' | 'unsportsmanlike-conduct' | 'slashing' | 'delaying-game-puck-over-glass' | 'holding' | 'holding-the-stick' | 'too-many-men-on-the-ice' | 'fighting' | 'minor' | 'cross-checking' | (string & {});
651
- type Reason = 'blocked' | 'failed-bank-attempt' | 'wide-right' | 'goalie-stopped-after-sog' | 'offside' | 'teammate-blocked' | 'icing' | 'puck-in-netting' | 'wide-left' | 'high-and-wide-left' | 'puck-frozen' | 'above-crossbar' | 'tv-timeout' | 'hand-pass' | 'skater-puck-frozen' | 'high-stick' | 'high-and-wide-right' | 'hit-crossbar' | 'puck-in-benches' | 'hit-right-post' | 'short' | 'referee-or-linesman' | 'puck-in-crowd' | 'hit-left-post' | 'player-equipment' | 'net-dislodged-defensive-skater' | 'home-timeout' | 'chlg-hm-goal-interference' | 'video-review' | 'chlg-league-missed-stoppage' | 'visitor-timeout' | 'official-injury' | (string & {});
652
- type EventTypeDescKey = 'period-start' | 'faceoff' | 'blocked-shot' | 'goal' | 'hit' | 'giveaway' | 'missed-shot' | 'shot-on-goal' | 'stoppage' | 'takeaway' | 'penalty' | 'period-end' | 'delayed-penalty' | 'game-end' | (string & {});
653
- /** An object containing a default string an optional localized strings. */
654
- interface LocalizedText {
655
- /** Default */
656
- default: string;
657
- /** French */
658
- fr?: string;
659
- /** Czech */
660
- cs?: string;
661
- /** German */
662
- de?: string;
663
- /** Spanish */
664
- es?: string;
665
- /** Finnish */
666
- fi?: string;
667
- /** Slovak */
668
- sk?: string;
669
- /** Swedish */
670
- sv?: string;
671
- }
672
- interface TvBroadcast {
673
- id: number;
674
- market: Market;
675
- countryCode: CountryCode;
676
- network: string;
677
- sequenceNumber: number;
3096
+ export { type index$1_APIResultPaginated as APIResultPaginated, type index$1_Config as Config, type index$1_Country as Country, type index$1_Draft as Draft, type index$1_Franchise as Franchise, type Game$6 as Game, type index$1_GlossaryEntry as GlossaryEntry, type GoalieLeader$1 as GoalieLeader, type index$1_GoalieMilestone as GoalieMilestone, type index$1_GoalieReport as GoalieReport, type index$1_GoalieStats as GoalieStats, type index$1_PaginatedData as PaginatedData, type index$1_PlayerInfo as PlayerInfo, type index$1_Season as Season, type index$1_ShiftChart as ShiftChart, type SkaterLeader$1 as SkaterLeader, type index$1_SkaterMilestone as SkaterMilestone, type index$1_SkaterReport as SkaterReport, type index$1_SkaterStats as SkaterStats, type index$1_StatsFilters as StatsFilters, type index$1_StatsPagination as StatsPagination, type index$1_StatsQueryParams as StatsQueryParams, type index$1_StatsSorting as StatsSorting, type Team$b as Team, type index$1_TeamLogo as TeamLogo, type index$1_TeamReport as TeamReport, type TeamStats$1 as TeamStats, type index$1_TeamStatsWithFranchise as TeamStatsWithFranchise, index$1_goalies as goalies, misc$1 as misc, seasonGame as season, index$1_skaters as skaters, index$1_teams as teams };
678
3097
  }
679
3098
 
680
3099
  interface GamecenterBoxscore {
@@ -689,17 +3108,17 @@ interface GamecenterBoxscore {
689
3108
  easternUTCOffset: UTCOffset;
690
3109
  venueUTCOffset: UTCOffset;
691
3110
  tvBroadcasts: TvBroadcast[];
692
- gameState: GameState;
3111
+ gameState: GameState$2;
693
3112
  gameScheduleState: GameScheduleState;
694
3113
  periodDescriptor?: PeriodDescriptor$9;
695
3114
  regPeriods: number;
696
3115
  awayTeam: Team$a;
697
3116
  homeTeam: Team$a;
698
- clock: Clock$4;
3117
+ clock: Clock$5;
699
3118
  playerByGameStats?: PlayerByGameStats;
700
3119
  summary?: Summary$3;
701
3120
  gameOutcome?: GameOutcome$5;
702
- situation?: Situation$2;
3121
+ situation?: Situation$3;
703
3122
  }
704
3123
  interface Team$a {
705
3124
  id: number;
@@ -713,7 +3132,7 @@ interface Team$a {
713
3132
  placeNameWithPreposition: LocalizedText;
714
3133
  radioLink?: string;
715
3134
  }
716
- interface Clock$4 {
3135
+ interface Clock$5 {
717
3136
  timeRemaining: string;
718
3137
  secondsRemaining: number;
719
3138
  running: boolean;
@@ -785,14 +3204,14 @@ interface Goalie$4 extends BasePlayer {
785
3204
  saves: number;
786
3205
  }
787
3206
  type Decision$1 = 'W' | 'L' | 'O';
788
- interface Situation$2 {
789
- homeTeam: SituationDetails;
790
- awayTeam: SituationDetails;
3207
+ interface Situation$3 {
3208
+ homeTeam: SituationDetails$1;
3209
+ awayTeam: SituationDetails$1;
791
3210
  situationCode: string;
792
3211
  timeRemaining: string;
793
3212
  secondsRemaining: number;
794
3213
  }
795
- interface SituationDetails {
3214
+ interface SituationDetails$1 {
796
3215
  abbrev: string;
797
3216
  situationDescriptions?: string[];
798
3217
  strength: number;
@@ -822,7 +3241,7 @@ interface Pick$1 {
822
3241
  teamPickHistory: string;
823
3242
  firstName: LocalizedText;
824
3243
  lastName: LocalizedText;
825
- positionCode: PositionCode;
3244
+ positionCode: DraftPositionCode;
826
3245
  countryCode: string;
827
3246
  height: number;
828
3247
  weight: number;
@@ -848,7 +3267,7 @@ type Name = 'North American Skater' | 'International Skater' | 'North American G
848
3267
  interface Ranking {
849
3268
  lastName: string;
850
3269
  firstName: string;
851
- positionCode: PositionCode;
3270
+ positionCode: DraftPositionCode;
852
3271
  shootsCatches: ShootsCatches;
853
3272
  heightInInches: number;
854
3273
  weightInPounds: number;
@@ -886,7 +3305,7 @@ interface Pick {
886
3305
  state: string;
887
3306
  lastName: LocalizedText;
888
3307
  firstName: LocalizedText;
889
- positionCode: PositionCode;
3308
+ positionCode: DraftPositionCode;
890
3309
  }
891
3310
 
892
3311
  interface GamecenterLanding {
@@ -903,7 +3322,7 @@ interface GamecenterLanding {
903
3322
  venueTimezone: string;
904
3323
  periodDescriptor?: PeriodDescriptor$8;
905
3324
  tvBroadcasts: TvBroadcast[];
906
- gameState: GameState;
3325
+ gameState: GameState$2;
907
3326
  gameScheduleState: GameScheduleState;
908
3327
  awayTeam: LandingTeam;
909
3328
  homeTeam: LandingTeam;
@@ -913,11 +3332,11 @@ interface GamecenterLanding {
913
3332
  otInUse: boolean;
914
3333
  tiesInUse: boolean;
915
3334
  summary?: Summary$2;
916
- clock?: Clock$3;
3335
+ clock?: Clock$4;
917
3336
  ticketsLink?: string;
918
3337
  ticketsLinkFr?: string;
919
3338
  matchup?: Matchup;
920
- situation?: Situation$1;
3339
+ situation?: Situation$2;
921
3340
  }
922
3341
  interface LandingTeam {
923
3342
  id: number;
@@ -932,7 +3351,7 @@ interface LandingTeam {
932
3351
  record?: string;
933
3352
  radioLink?: string;
934
3353
  }
935
- interface Clock$3 {
3354
+ interface Clock$4 {
936
3355
  timeRemaining: string;
937
3356
  secondsRemaining: number;
938
3357
  running: boolean;
@@ -1053,7 +3472,7 @@ interface PeriodDescriptor$8 {
1053
3472
  periodType: PeriodType;
1054
3473
  maxRegulationPeriods: number;
1055
3474
  }
1056
- interface Situation$1 {
3475
+ interface Situation$2 {
1057
3476
  homeTeam: SituationTeam;
1058
3477
  awayTeam: SituationTeam;
1059
3478
  situationCode: string;
@@ -1173,7 +3592,7 @@ interface ThreeStar$1 {
1173
3592
  savePctg?: number;
1174
3593
  }
1175
3594
 
1176
- type NHLSeasons = Array<Season>;
3595
+ type NHLSeasons = Array<Season$1>;
1177
3596
  interface PlayoffSeriesMeta {
1178
3597
  seriesTitle: string;
1179
3598
  teams: Teams;
@@ -1272,14 +3691,14 @@ interface GamecenterPlayByPlay {
1272
3691
  easternUTCOffset: UTCOffset;
1273
3692
  venueUTCOffset: UTCOffset;
1274
3693
  tvBroadcasts: TvBroadcast[];
1275
- gameState: GameState;
3694
+ gameState: GameState$2;
1276
3695
  gameScheduleState: GameScheduleState;
1277
3696
  periodDescriptor?: PeriodDescriptor$7;
1278
3697
  awayTeam: Team$7;
1279
3698
  homeTeam: Team$7;
1280
3699
  shootoutInUse: boolean;
1281
3700
  otInUse: boolean;
1282
- clock: Clock$2;
3701
+ clock: Clock$3;
1283
3702
  displayPeriod: number;
1284
3703
  maxPeriods: number;
1285
3704
  gameOutcome?: GameOutcome$4;
@@ -1287,9 +3706,9 @@ interface GamecenterPlayByPlay {
1287
3706
  rosterSpots: RosterSpot[];
1288
3707
  regPeriods: number;
1289
3708
  summary?: Summary$1;
1290
- situation?: Situation;
3709
+ situation?: Situation$1;
1291
3710
  }
1292
- interface Clock$2 {
3711
+ interface Clock$3 {
1293
3712
  timeRemaining: string;
1294
3713
  secondsRemaining: number;
1295
3714
  running: boolean;
@@ -1362,10 +3781,10 @@ interface RosterSpot {
1362
3781
  firstName: LocalizedText;
1363
3782
  lastName: LocalizedText;
1364
3783
  sweaterNumber: number;
1365
- positionCode: Position;
3784
+ positionCode: PositionCode;
1366
3785
  headshot: string;
1367
3786
  }
1368
- interface Situation {
3787
+ interface Situation$1 {
1369
3788
  homeTeam: Team$7;
1370
3789
  awayTeam: Team$7;
1371
3790
  situationCode: string;
@@ -1406,7 +3825,7 @@ interface PenaltyBoxElement {
1406
3825
  playerId: number;
1407
3826
  name: LocalizedText;
1408
3827
  sweaterNumber: number;
1409
- positionCode: Position;
3828
+ positionCode: PositionCode;
1410
3829
  headshot: string;
1411
3830
  totalSOI?: number;
1412
3831
  secondsRemaining?: number;
@@ -1415,7 +3834,7 @@ interface GoalieElement {
1415
3834
  playerId: number;
1416
3835
  name: LocalizedText;
1417
3836
  sweaterNumber: number;
1418
- positionCode: Position;
3837
+ positionCode: PositionCode;
1419
3838
  headshot: string;
1420
3839
  totalSOI?: number;
1421
3840
  }
@@ -1437,7 +3856,7 @@ interface PurpleForward {
1437
3856
  playerId: number;
1438
3857
  name: LocalizedText;
1439
3858
  sweaterNumber: number;
1440
- positionCode: Position;
3859
+ positionCode: PositionCode;
1441
3860
  headshot: string;
1442
3861
  totalSOI?: number;
1443
3862
  }
@@ -1446,7 +3865,7 @@ interface PlayerSpotlight {
1446
3865
  playerId: number;
1447
3866
  name: LocalizedText;
1448
3867
  playerSlug: string;
1449
- position: Position;
3868
+ position: PositionCode;
1450
3869
  sweaterNumber: number;
1451
3870
  teamId: number;
1452
3871
  headshot: string;
@@ -1461,7 +3880,7 @@ interface PlayerLanding {
1461
3880
  lastName: LocalizedText;
1462
3881
  badges: Badge[];
1463
3882
  sweaterNumber: number;
1464
- position: Position;
3883
+ position: PositionCode;
1465
3884
  headshot: string;
1466
3885
  heroImage: string;
1467
3886
  heightInInches: number;
@@ -1472,7 +3891,7 @@ interface PlayerLanding {
1472
3891
  birthCity: LocalizedText;
1473
3892
  birthStateProvince?: LocalizedText;
1474
3893
  birthCountry: string;
1475
- shootsCatches: Position;
3894
+ shootsCatches: ShootsCatches;
1476
3895
  draftDetails?: DraftDetails;
1477
3896
  playerSlug: string;
1478
3897
  inTop100AllTime: number;
@@ -1864,7 +4283,7 @@ interface BasePPTReplay {
1864
4283
  gameDate: string;
1865
4284
  awayTeam: Team$5;
1866
4285
  homeTeam: Team$5;
1867
- gameState: GameState;
4286
+ gameState: GameState$2;
1868
4287
  gameType: number;
1869
4288
  }
1870
4289
  interface Team$5 {
@@ -2021,14 +4440,14 @@ interface SeasonSeriesGame {
2021
4440
  startTimeUTC: string;
2022
4441
  easternUTCOffset: UTCOffset;
2023
4442
  venueUTCOffset: UTCOffset;
2024
- gameState: GameState;
4443
+ gameState: GameState$2;
2025
4444
  gameScheduleState: GameScheduleState;
2026
4445
  awayTeam: TeamDetail;
2027
4446
  homeTeam: TeamDetail;
2028
4447
  periodDescriptor?: PeriodDescriptor$4;
2029
4448
  gameCenterLink: string;
2030
4449
  gameOutcome: GameOutcome$2;
2031
- clock?: Clock$1;
4450
+ clock?: Clock$2;
2032
4451
  }
2033
4452
  interface TeamDetail {
2034
4453
  id: number;
@@ -2036,7 +4455,7 @@ interface TeamDetail {
2036
4455
  logo: string;
2037
4456
  score?: number;
2038
4457
  }
2039
- interface Clock$1 {
4458
+ interface Clock$2 {
2040
4459
  timeRemaining: string;
2041
4460
  secondsRemaining: number;
2042
4461
  running: boolean;
@@ -2099,7 +4518,7 @@ interface Game$3 {
2099
4518
  easternUTCOffset: UTCOffset;
2100
4519
  venueUTCOffset: UTCOffset;
2101
4520
  venueTimezone: string;
2102
- gameState: GameState;
4521
+ gameState: GameState$2;
2103
4522
  gameScheduleState: GameScheduleState;
2104
4523
  tvBroadcasts: TvBroadcast[];
2105
4524
  awayTeam: Team$4;
@@ -2204,7 +4623,7 @@ interface Game$2 {
2204
4623
  easternUTCOffset: UTCOffset;
2205
4624
  venueUTCOffset: UTCOffset;
2206
4625
  tvBroadcasts: TvBroadcast[];
2207
- gameState: GameState;
4626
+ gameState: GameState$2;
2208
4627
  gameScheduleState: GameScheduleState;
2209
4628
  awayTeam: Team$3;
2210
4629
  homeTeam: Team$3;
@@ -2270,7 +4689,7 @@ interface Game$1 {
2270
4689
  easternUTCOffset: UTCOffset;
2271
4690
  venueUTCOffset: UTCOffset;
2272
4691
  tvBroadcasts: TvBroadcast[];
2273
- gameState: GameState;
4692
+ gameState: GameState$2;
2274
4693
  gameScheduleState: GameScheduleState;
2275
4694
  awayTeam: Team$2;
2276
4695
  homeTeam: Team$2;
@@ -2278,6 +4697,8 @@ interface Game$1 {
2278
4697
  ticketsLinkFr: string;
2279
4698
  period?: number;
2280
4699
  periodDescriptor?: PeriodDescriptor$2;
4700
+ clock?: Clock$1;
4701
+ situation?: Situation;
2281
4702
  threeMinRecap?: string;
2282
4703
  threeMinRecapFr?: string;
2283
4704
  }
@@ -2288,6 +4709,7 @@ interface Team$2 {
2288
4709
  placeNameWithPreposition: LocalizedText;
2289
4710
  abbrev: TeamAbbrev;
2290
4711
  score?: number;
4712
+ sog?: number;
2291
4713
  logo: string;
2292
4714
  record?: string;
2293
4715
  }
@@ -2296,6 +4718,24 @@ interface PeriodDescriptor$2 {
2296
4718
  periodType: PeriodType;
2297
4719
  maxRegulationPeriods: number;
2298
4720
  }
4721
+ interface Clock$1 {
4722
+ timeRemaining: string;
4723
+ secondsRemaining: number;
4724
+ running: boolean;
4725
+ inIntermission: boolean;
4726
+ }
4727
+ interface Situation {
4728
+ homeTeam: SituationDetails;
4729
+ awayTeam: SituationDetails;
4730
+ situationCode: string;
4731
+ timeRemaining: string;
4732
+ secondsRemaining: number;
4733
+ }
4734
+ interface SituationDetails {
4735
+ abbrev: string;
4736
+ situationDescriptions?: string[];
4737
+ strength: number;
4738
+ }
2299
4739
 
2300
4740
  interface NHLStandings {
2301
4741
  wildCardIndicator: boolean;
@@ -2442,7 +4882,7 @@ interface Goalie$3 extends BaseProspect {
2442
4882
  positionCode: 'G';
2443
4883
  }
2444
4884
 
2445
- type TeamRosterSeasons = Array<Season>;
4885
+ type TeamRosterSeasons = Array<Season$1>;
2446
4886
  interface TeamRoster {
2447
4887
  forwards: Forward[];
2448
4888
  defensemen: Defenseman[];
@@ -2510,7 +4950,7 @@ interface Game {
2510
4950
  easternUTCOffset: string;
2511
4951
  venueUTCOffset: string;
2512
4952
  venueTimezone: string;
2513
- gameState: GameState;
4953
+ gameState: GameState$2;
2514
4954
  gameScheduleState: GameScheduleState;
2515
4955
  tvBroadcasts: TvBroadcast[];
2516
4956
  awayTeam: Team$1;
@@ -2580,7 +5020,7 @@ interface WinningGoal {
2580
5020
  lastName: LocalizedText;
2581
5021
  }
2582
5022
  interface AlternateBroadcast {
2583
- country: CountryCode;
5023
+ country: CountryCode$2;
2584
5024
  descriptions: LocalizedText[];
2585
5025
  }
2586
5026
 
@@ -2669,7 +5109,7 @@ interface WSCGameStory {
2669
5109
  venueUTCOffset: UTCOffset;
2670
5110
  venueTimezone: string;
2671
5111
  tvBroadcasts: TvBroadcast[];
2672
- gameState: GameState;
5112
+ gameState: GameState$2;
2673
5113
  gameScheduleState: 'OK';
2674
5114
  awayTeam: Team;
2675
5115
  homeTeam: Team;
@@ -2915,7 +5355,7 @@ type PlayerSearchResult = Record<string, unknown>;
2915
5355
  * picks(2023, 1).then((data) => console.log(data));
2916
5356
  * ```
2917
5357
  */
2918
- declare function picks(year?: Year, round?: DraftRound): Promise<APIResponse<DraftPicks>>;
5358
+ declare function picks(year?: Year, round?: DraftRound): Promise<APIResult<DraftPicks>>;
2919
5359
  /**
2920
5360
  * Get current draft tracker information for live draft coverage
2921
5361
  * @returns Promise resolving to current draft tracker data, including live pick information
@@ -2924,7 +5364,7 @@ declare function picks(year?: Year, round?: DraftRound): Promise<APIResponse<Dra
2924
5364
  * tracker().then((data) => console.log(data));
2925
5365
  * ```
2926
5366
  */
2927
- declare function tracker(): Promise<APIResponse<DraftTracker>>;
5367
+ declare function tracker(): Promise<APIResult<DraftTracker>>;
2928
5368
  /**
2929
5369
  * Access draft rankings by category (skaters/goalies, NA/International)
2930
5370
  * @param year - The draft year (defaults to current year if not provided)
@@ -2939,11 +5379,11 @@ declare function tracker(): Promise<APIResponse<DraftTracker>>;
2939
5379
  * ```
2940
5380
  */
2941
5381
  declare function rankings(year?: Year): {
2942
- skatersNA: () => Promise<APIResponse<DraftRankings>>;
2943
- skatersIntl: () => Promise<APIResponse<DraftRankings>>;
2944
- goaliesNA: () => Promise<APIResponse<DraftRankings>>;
2945
- goaliesIntl: () => Promise<APIResponse<DraftRankings>>;
2946
- all: () => Promise<APIResponse<DraftRankings[]>>;
5382
+ skatersNA: () => Promise<APIResult<DraftRankings>>;
5383
+ skatersIntl: () => Promise<APIResult<DraftRankings>>;
5384
+ goaliesNA: () => Promise<APIResult<DraftRankings>>;
5385
+ goaliesIntl: () => Promise<APIResult<DraftRankings>>;
5386
+ all: () => Promise<APIResult<DraftRankings[]>>;
2947
5387
  };
2948
5388
 
2949
5389
  declare const draft_picks: typeof picks;
@@ -2962,7 +5402,7 @@ declare namespace draft {
2962
5402
  * playByPlay(2023020001).then((data) => console.log(data));
2963
5403
  * ```
2964
5404
  */
2965
- declare function playByPlay(gameId: GameId): Promise<APIResponse<GamecenterPlayByPlay>>;
5405
+ declare function playByPlay(gameId: GameId): Promise<APIResult<GamecenterPlayByPlay>>;
2966
5406
  /**
2967
5407
  * Get comprehensive game data including stats, reports, and game information
2968
5408
  *
@@ -2993,7 +5433,7 @@ declare function playByPlay(gameId: GameId): Promise<APIResponse<GamecenterPlayB
2993
5433
  * reports(2023020001).then((data) => console.log(data));
2994
5434
  * ```
2995
5435
  */
2996
- declare function reports(gameId: GameId): Promise<APIResponse<GamecenterReports>>;
5436
+ declare function reports(gameId: GameId): Promise<APIResult<GamecenterReports>>;
2997
5437
  /**
2998
5438
  * Get landing page data for a specific game
2999
5439
  * @param gameId - The unique identifier for the game (10-digit format)
@@ -3003,7 +5443,7 @@ declare function reports(gameId: GameId): Promise<APIResponse<GamecenterReports>
3003
5443
  * landing(2023020001).then((data) => console.log(data));
3004
5444
  * ```
3005
5445
  */
3006
- declare function landing$1(gameId: GameId): Promise<APIResponse<GamecenterLanding>>;
5446
+ declare function landing$1(gameId: GameId): Promise<APIResult<GamecenterLanding>>;
3007
5447
  /**
3008
5448
  * Get boxscore data for a specific game
3009
5449
  * @param gameId - The unique identifier for the game (10-digit format)
@@ -3013,7 +5453,7 @@ declare function landing$1(gameId: GameId): Promise<APIResponse<GamecenterLandin
3013
5453
  * boxscore(2023020001).then((data) => console.log(data));
3014
5454
  * ```
3015
5455
  */
3016
- declare function boxscore(gameId: GameId): Promise<APIResponse<GamecenterBoxscore>>;
5456
+ declare function boxscore(gameId: GameId): Promise<APIResult<GamecenterBoxscore>>;
3017
5457
  /**
3018
5458
  * Access WSC Sports related game content endpoints
3019
5459
  * @description Alternative data source for game information
@@ -3031,7 +5471,7 @@ declare const wsc: {
3031
5471
  * wsc.gameStory(2023020001).then((data) => console.log(data));
3032
5472
  * ```
3033
5473
  */
3034
- declare function wscGameStory(gameId: GameId): Promise<APIResponse<WSCGameStory>>;
5474
+ declare function wscGameStory(gameId: GameId): Promise<APIResult<WSCGameStory>>;
3035
5475
  /**
3036
5476
  * Get WSC play-by-play data for a specific game
3037
5477
  * @param gameId - The unique identifier for the game (10-digit format)
@@ -3041,7 +5481,7 @@ declare function wscGameStory(gameId: GameId): Promise<APIResponse<WSCGameStory>
3041
5481
  * wsc.playByPlay(2023020001).then((data) => console.log(data));
3042
5482
  * ```
3043
5483
  */
3044
- declare function wscPlayByPlay(gameId: GameId): Promise<APIResponse<WSCPlayByPlay>>;
5484
+ declare function wscPlayByPlay(gameId: GameId): Promise<APIResult<WSCPlayByPlay>>;
3045
5485
  /**
3046
5486
  * Access PPT (Player and Puck Tracking) visualization data endpoints
3047
5487
  * @description Endpoints for accessing player and puck tracking data used for replay visualizations
@@ -3060,7 +5500,7 @@ declare const pptReplay: {
3060
5500
  * pptReplay.goal(2023020001, 42).then((data) => console.log(data));
3061
5501
  * ```
3062
5502
  */
3063
- declare function pptReplayGoal(gameId: GameId, eventId: number | string): Promise<APIResponse<PPTReplayGoal>>;
5503
+ declare function pptReplayGoal(gameId: GameId, eventId: number | string): Promise<APIResult<PPTReplayGoal>>;
3064
5504
  /**
3065
5505
  * Get player and puck tracking visualization data for a specific event
3066
5506
  * @param gameId - The unique identifier for the game (10-digit format)
@@ -3071,7 +5511,7 @@ declare function pptReplayGoal(gameId: GameId, eventId: number | string): Promis
3071
5511
  * pptReplay.event(2023020001, 42).then((data) => console.log(data));
3072
5512
  * ```
3073
5513
  */
3074
- declare function pptReplayEvent(gameId: GameId, eventId: number | string): Promise<APIResponse<PPTReplayEvent>>;
5514
+ declare function pptReplayEvent(gameId: GameId, eventId: number | string): Promise<APIResult<PPTReplayEvent>>;
3075
5515
  /**
3076
5516
  * Get the league schedule for a specific date
3077
5517
  * @param date - Date to get schedule for (Date object or ISO date string 'YYYY-MM-DD'). Defaults to current date
@@ -3085,7 +5525,7 @@ declare function pptReplayEvent(gameId: GameId, eventId: number | string): Promi
3085
5525
  * schedule('2023-11-15').then((data) => console.log(data));
3086
5526
  * ```
3087
5527
  */
3088
- declare function schedule$1(date?: Date | string): Promise<APIResponse<LeagueSchedule>>;
5528
+ declare function schedule$1(date?: Date | string): Promise<APIResult<LeagueSchedule>>;
3089
5529
  /**
3090
5530
  * Get schedule calendar data for a specific date
3091
5531
  * @param date - Date to get calendar data for (Date object or ISO date string 'YYYY-MM-DD'). Defaults to current date
@@ -3095,7 +5535,7 @@ declare function schedule$1(date?: Date | string): Promise<APIResponse<LeagueSch
3095
5535
  * scheduleCalendar('2023-11-15').then((data) => console.log(data));
3096
5536
  * ```
3097
5537
  */
3098
- declare function scheduleCalendar(date?: Date | string): Promise<APIResponse<ScheduleCalendar>>;
5538
+ declare function scheduleCalendar(date?: Date | string): Promise<APIResult<ScheduleCalendar>>;
3099
5539
  /**
3100
5540
  * Get playoff bracket data for a specific year
3101
5541
  * @param year - The playoff year (YYYY format). Defaults to current year
@@ -3105,7 +5545,7 @@ declare function scheduleCalendar(date?: Date | string): Promise<APIResponse<Sch
3105
5545
  * playoffBracket(2023).then((data) => console.log(data));
3106
5546
  * ```
3107
5547
  */
3108
- declare function playoffBracket(year?: Year): Promise<APIResponse<PlayoffBracket>>;
5548
+ declare function playoffBracket(year?: Year): Promise<APIResult<PlayoffBracket>>;
3109
5549
  /**
3110
5550
  * Get playoff series information for a season
3111
5551
  * @param season - The season identifier (8-digit format: YYYYYYYY, e.g., 20232024). Defaults to current season
@@ -3115,7 +5555,7 @@ declare function playoffBracket(year?: Year): Promise<APIResponse<PlayoffBracket
3115
5555
  * playoffSeries(20232024).then((data) => console.log(data));
3116
5556
  * ```
3117
5557
  */
3118
- declare function playoffSeries(season?: Season): Promise<APIResponse<PlayoffSeries>>;
5558
+ declare function playoffSeries(season?: Season$1): Promise<APIResult<PlayoffSeries>>;
3119
5559
  /**
3120
5560
  * Get schedule for a specific playoff series
3121
5561
  * @param seriesLetter - Single letter identifier for the playoff series (A-O)
@@ -3126,17 +5566,19 @@ declare function playoffSeries(season?: Season): Promise<APIResponse<PlayoffSeri
3126
5566
  * playoffSeriesSchedule('A', 20232024).then((data) => console.log(data));
3127
5567
  * ```
3128
5568
  */
3129
- declare function playoffSeriesSchedule(seriesLetter: SeriesLetter$1, season?: Season): Promise<APIResponse<PlayoffSeriesSchedule>>;
3130
- declare function playoffSeriesSchedule(seriesLetter: string, season?: Season): Promise<APIResponse<PlayoffSeriesSchedule>>;
5569
+ declare function playoffSeriesSchedule(seriesLetter: SeriesLetter$1, season?: Season$1): Promise<APIResult<PlayoffSeriesSchedule>>;
5570
+ declare function playoffSeriesSchedule(seriesLetter: string, season?: Season$1): Promise<APIResult<PlayoffSeriesSchedule>>;
3131
5571
  /**
3132
5572
  * Get information about where games are available to watch
5573
+ * @deprecated The NHL retired this endpoint, and it now returns 404
5574
+ * (`NotFoundError`). It will be removed in a future major version.
3133
5575
  * @returns Promise resolving to streaming and broadcast availability information
3134
5576
  * @example
3135
5577
  * ```ts
3136
5578
  * whereToWatch().then((data) => console.log(data));
3137
5579
  * ```
3138
5580
  */
3139
- declare function whereToWatch(): Promise<APIResponse<WhereToWatch>>;
5581
+ declare function whereToWatch(): Promise<APIResult<WhereToWatch>>;
3140
5582
  /**
3141
5583
  * Get TV network schedule for a specific date
3142
5584
  * @param date - Date to get TV schedule for (Date object or ISO date string 'YYYY-MM-DD'). Defaults to current date
@@ -3146,7 +5588,7 @@ declare function whereToWatch(): Promise<APIResponse<WhereToWatch>>;
3146
5588
  * networkTVSchedule('2023-11-15').then((data) => console.log(data));
3147
5589
  * ```
3148
5590
  */
3149
- declare function networkTVSchedule(date?: Date | string): Promise<APIResponse<NetworkTVSchedule>>;
5591
+ declare function networkTVSchedule(date?: Date | string): Promise<APIResult<NetworkTVSchedule>>;
3150
5592
 
3151
5593
  declare const game_boxscore: typeof boxscore;
3152
5594
  declare const game_networkTVSchedule: typeof networkTVSchedule;
@@ -3176,7 +5618,7 @@ declare namespace game {
3176
5618
  * seasons().then((data) => console.log(data));
3177
5619
  * ```
3178
5620
  */
3179
- declare function seasons(): Promise<APIResponse<NHLSeasons>>;
5621
+ declare function seasons(): Promise<APIResult<NHLSeasons>>;
3180
5622
  /**
3181
5623
  * Access meta information endpoints
3182
5624
  * @description Get metadata about playoff series and games
@@ -3195,7 +5637,7 @@ declare const meta: {
3195
5637
  * meta.game(2023020001).then((data) => console.log(data));
3196
5638
  * ```
3197
5639
  */
3198
- declare function metaGame(gameId: GameId): Promise<APIResponse<GameMeta>>;
5640
+ declare function metaGame(gameId: GameId): Promise<APIResult<GameMeta>>;
3199
5641
  /**
3200
5642
  * Get meta information for a playoff series
3201
5643
  *
@@ -3207,8 +5649,8 @@ declare function metaGame(gameId: GameId): Promise<APIResponse<GameMeta>>;
3207
5649
  * meta.playoffSeries('A', 2023).then((data) => console.log(data));
3208
5650
  * ```
3209
5651
  */
3210
- declare function metaPlayoffSeries(seriesLetter: SeriesLetter$1, year?: Year): Promise<APIResponse<PlayoffSeriesMeta>>;
3211
- declare function metaPlayoffSeries(seriesLetter: string, year?: Year): Promise<APIResponse<PlayoffSeriesMeta>>;
5652
+ declare function metaPlayoffSeries(seriesLetter: SeriesLetter$1, year?: Year): Promise<APIResult<PlayoffSeriesMeta>>;
5653
+ declare function metaPlayoffSeries(seriesLetter: string, year?: Year): Promise<APIResult<PlayoffSeriesMeta>>;
3212
5654
  /**
3213
5655
  * Lookup information based on postal/zip code
3214
5656
  *
@@ -3220,7 +5662,7 @@ declare function metaPlayoffSeries(seriesLetter: string, year?: Year): Promise<A
3220
5662
  * postalLookup('M5H 2N2').then((data) => console.log(data)); // Canadian postal
3221
5663
  * ```
3222
5664
  */
3223
- declare function postalLookup(postalCode: PostalCode): Promise<APIResponse<PostalCodeInfo>>;
5665
+ declare function postalLookup(postalCode: PostalCode): Promise<APIResult<PostalCodeInfo>>;
3224
5666
  /**
3225
5667
  * Get location information based on IP address
3226
5668
  *
@@ -3231,7 +5673,7 @@ declare function postalLookup(postalCode: PostalCode): Promise<APIResponse<Posta
3231
5673
  * location().then((data) => console.log(data));
3232
5674
  * ```
3233
5675
  */
3234
- declare function location(): Promise<APIResponse<LocationInfo>>;
5676
+ declare function location(): Promise<APIResult<LocationInfo>>;
3235
5677
  /**
3236
5678
  * Get partner game information for a specific country
3237
5679
  *
@@ -3242,7 +5684,7 @@ declare function location(): Promise<APIResponse<LocationInfo>>;
3242
5684
  * partnerGame('USA').then((data) => console.log(data));
3243
5685
  * ```
3244
5686
  */
3245
- declare function partnerGame(countryCode: CountryCode$1): Promise<APIResponse<PartnerGameInfo>>;
5687
+ declare function partnerGame(countryCode: CountryCode): Promise<APIResult<PartnerGameInfo>>;
3246
5688
 
3247
5689
  declare const misc_location: typeof location;
3248
5690
  declare const misc_meta: typeof meta;
@@ -3267,7 +5709,7 @@ declare namespace misc {
3267
5709
  * landing(8478402).then((data) => console.log(data)); // Connor McDavid
3268
5710
  * ```
3269
5711
  */
3270
- declare function landing(playerId: number | string): Promise<APIResponse<PlayerLanding>>;
5712
+ declare function landing(playerId: number | string): Promise<APIResult<PlayerLanding>>;
3271
5713
  /**
3272
5714
  * Get player game log for a specific season
3273
5715
  * @param playerId - The unique player identifier (NHL player ID number)
@@ -3279,8 +5721,8 @@ declare function landing(playerId: number | string): Promise<APIResponse<PlayerL
3279
5721
  * gameLog(8478402, 20232024, 2).then((data) => console.log(data));
3280
5722
  * ```
3281
5723
  */
3282
- declare function gameLog(playerId: number | string, season?: Season, gameType?: GameType): Promise<APIResponse<PlayerGameLog>>;
3283
- declare function gameLog(playerId: number | string, season?: Season, gameType?: number | string): Promise<APIResponse<PlayerGameLog>>;
5724
+ declare function gameLog(playerId: number | string, season?: Season$1, gameType?: GameType): Promise<APIResult<PlayerGameLog>>;
5725
+ declare function gameLog(playerId: number | string, season?: Season$1, gameType?: number | string): Promise<APIResult<PlayerGameLog>>;
3284
5726
  /**
3285
5727
  * Get player spotlight featuring highlighted players
3286
5728
  * @returns Promise resolving to featured/spotlight players
@@ -3289,7 +5731,7 @@ declare function gameLog(playerId: number | string, season?: Season, gameType?:
3289
5731
  * spotlight().then((data) => console.log(data));
3290
5732
  * ```
3291
5733
  */
3292
- declare function spotlight(): Promise<APIResponse<PlayerSpotlight[]>>;
5734
+ declare function spotlight(): Promise<APIResult<PlayerSpotlight[]>>;
3293
5735
  /**
3294
5736
  * Search for players by name
3295
5737
  * @param query - The search query string (player name)
@@ -3300,7 +5742,7 @@ declare function spotlight(): Promise<APIResponse<PlayerSpotlight[]>>;
3300
5742
  * search('McDavid').then((data) => console.log(data));
3301
5743
  * ```
3302
5744
  */
3303
- declare function search(query: string): Promise<APIResponse<PlayerSearchResult[] | undefined>>;
5745
+ declare function search(query: string): Promise<APIResult<PlayerSearchResult[] | undefined>>;
3304
5746
  /**
3305
5747
  * Access stats leaders endpoints for skaters and goalies
3306
5748
  * @description Get statistical leaders across various categories
@@ -3319,7 +5761,7 @@ declare const statsLeaders: {
3319
5761
  * statsLeaders.skaters(20232024, 2).then((data) => console.log(data));
3320
5762
  * ```
3321
5763
  */
3322
- declare function statsLeadersSkaters(season?: Season, gameType?: GameType): Promise<APIResponse<SkaterStatsLeaders>>;
5764
+ declare function statsLeadersSkaters(season?: Season$1, gameType?: GameType): Promise<APIResult<SkaterStatsLeaders>>;
3323
5765
  /**
3324
5766
  * Get goalie stats leaders
3325
5767
  * @param season - The season identifier (8-digit format: YYYYYYYY). Defaults to current season
@@ -3330,7 +5772,7 @@ declare function statsLeadersSkaters(season?: Season, gameType?: GameType): Prom
3330
5772
  * statsLeaders.goalies(20232024, 2).then((data) => console.log(data));
3331
5773
  * ```
3332
5774
  */
3333
- declare function statsLeadersGoalies(season?: Season, gameType?: GameType): Promise<APIResponse<GoalieStatsLeaders>>;
5775
+ declare function statsLeadersGoalies(season?: Season$1, gameType?: GameType): Promise<APIResult<GoalieStatsLeaders>>;
3334
5776
 
3335
5777
  declare const player_gameLog: typeof gameLog;
3336
5778
  declare const player_landing: typeof landing;
@@ -3354,7 +5796,7 @@ declare namespace player {
3354
5796
  * score('2023-11-15').then((data) => console.log(data));
3355
5797
  * ```
3356
5798
  */
3357
- declare function score(date?: Date | string): Promise<APIResponse<Score>>;
5799
+ declare function score(date?: Date | string): Promise<APIResult<Score>>;
3358
5800
  /**
3359
5801
  * Get current scoreboard information
3360
5802
  * @returns Promise resolving to current scoreboard with live and recent game data
@@ -3363,10 +5805,10 @@ declare function score(date?: Date | string): Promise<APIResponse<Score>>;
3363
5805
  * scoreboard().then((data) => console.log(data));
3364
5806
  * ```
3365
5807
  */
3366
- declare function scoreboard(): Promise<APIResponse<Scoreboard>>;
5808
+ declare function scoreboard(): Promise<APIResult<Scoreboard>>;
3367
5809
  declare namespace scoreboard {
3368
- var team: (team: TeamAbbrev) => Promise<APIResponse<Scoreboard>>;
3369
- var date: (date: Date | string) => Promise<APIResponse<Scoreboard>>;
5810
+ var team: (team: TeamAbbrev) => Promise<APIResult<Scoreboard>>;
5811
+ var date: (date: Date | string) => Promise<APIResult<Scoreboard>>;
3370
5812
  }
3371
5813
 
3372
5814
  /**
@@ -3378,7 +5820,7 @@ declare namespace scoreboard {
3378
5820
  * rosterSeasons('TOR').then((data) => console.log(data));
3379
5821
  * ```
3380
5822
  */
3381
- declare function rosterSeasons(team: TeamAbbrev): Promise<APIResponse<TeamRosterSeasons>>;
5823
+ declare function rosterSeasons(team: TeamAbbrev): Promise<APIResult<TeamRosterSeasons>>;
3382
5824
  /**
3383
5825
  * Get team roster for a specific season
3384
5826
  * @param team - The team abbreviation (e.g., 'TOR', 'MTL', 'NYR')
@@ -3389,7 +5831,7 @@ declare function rosterSeasons(team: TeamAbbrev): Promise<APIResponse<TeamRoster
3389
5831
  * roster('TOR', 20232024).then((data) => console.log(data));
3390
5832
  * ```
3391
5833
  */
3392
- declare function roster(team: string, season?: string | number): Promise<APIResponse<TeamRoster>>;
5834
+ declare function roster(team: string, season?: string | number): Promise<APIResult<TeamRoster>>;
3393
5835
  /**
3394
5836
  * Get team prospects information
3395
5837
  * @param team - The team abbreviation (e.g., 'TOR', 'MTL', 'NYR')
@@ -3399,7 +5841,7 @@ declare function roster(team: string, season?: string | number): Promise<APIResp
3399
5841
  * prospects('TOR').then((data) => console.log(data));
3400
5842
  * ```
3401
5843
  */
3402
- declare function prospects(team: TeamAbbrev): Promise<APIResponse<TeamProspects>>;
5844
+ declare function prospects(team: TeamAbbrev): Promise<APIResult<TeamProspects>>;
3403
5845
  /**
3404
5846
  * Get team statistics for a specific season
3405
5847
  * @param team - The team abbreviation (e.g., 'TOR', 'MTL', 'NYR')
@@ -3411,7 +5853,7 @@ declare function prospects(team: TeamAbbrev): Promise<APIResponse<TeamProspects>
3411
5853
  * stats('TOR', 20232024, 'REG').then((data) => console.log(data));
3412
5854
  * ```
3413
5855
  */
3414
- declare function stats(team: TeamAbbrev, season?: Season, gameType?: GameType): Promise<APIResponse<TeamStats>>;
5856
+ declare function stats(team: TeamAbbrev, season?: Season$1, gameType?: GameType): Promise<APIResult<TeamStats>>;
3415
5857
  /**
3416
5858
  * Get valid season and game type options for a team's statistics
3417
5859
  * @param team - The team abbreviation (e.g., 'TOR', 'MTL', 'NYR')
@@ -3423,7 +5865,7 @@ declare function stats(team: TeamAbbrev, season?: Season, gameType?: GameType):
3423
5865
  * statsSeason('TOR').then((data) => console.log(data));
3424
5866
  * ```
3425
5867
  */
3426
- declare function statsSeason(team: TeamAbbrev): Promise<APIResponse<TeamStatsSeason>>;
5868
+ declare function statsSeason(team: TeamAbbrev): Promise<APIResult<TeamStatsSeason>>;
3427
5869
  /**
3428
5870
  * Get league standings for a specific date
3429
5871
  * @param date - Date to get standings for (Date object or ISO date string 'YYYY-MM-DD'). Defaults to current date
@@ -3433,7 +5875,7 @@ declare function statsSeason(team: TeamAbbrev): Promise<APIResponse<TeamStatsSea
3433
5875
  * standings('2023-11-15').then((data) => console.log(data));
3434
5876
  * ```
3435
5877
  */
3436
- declare function standings(date?: Date | string): Promise<APIResponse<NHLStandings>>;
5878
+ declare function standings(date?: Date | string): Promise<APIResult<NHLStandings>>;
3437
5879
  /**
3438
5880
  * Get current season standings information
3439
5881
  * @returns Promise resolving to current season standings with detailed team records
@@ -3442,7 +5884,7 @@ declare function standings(date?: Date | string): Promise<APIResponse<NHLStandin
3442
5884
  * standingsSeason().then((data) => console.log(data));
3443
5885
  * ```
3444
5886
  */
3445
- declare function standingsSeason(): Promise<APIResponse<NHLStandingsSeason>>;
5887
+ declare function standingsSeason(): Promise<APIResult<NHLStandingsSeason>>;
3446
5888
  /**
3447
5889
  * Get the team schedule for any seven-day period
3448
5890
  * @param team - The team abbreviation (e.g., 'TOR', 'MTL', 'NYR')
@@ -3459,8 +5901,8 @@ declare function standingsSeason(): Promise<APIResponse<NHLStandingsSeason>>;
3459
5901
  * });
3460
5902
  * ```
3461
5903
  */
3462
- declare function scheduleWeek(team: TeamAbbrev, date?: Date | string): Promise<APIResponse<TeamScheduleWeek>>;
3463
- declare function scheduleWeek(team: string, date?: Date | string): Promise<APIResponse<TeamScheduleWeek>>;
5904
+ declare function scheduleWeek(team: TeamAbbrev, date?: Date | string): Promise<APIResult<TeamScheduleWeek>>;
5905
+ declare function scheduleWeek(team: string, date?: Date | string): Promise<APIResult<TeamScheduleWeek>>;
3464
5906
  /**
3465
5907
  * Get the team schedule for any month
3466
5908
  * @param team - The team abbreviation (e.g., 'TOR', 'MTL', 'NYR')
@@ -3476,8 +5918,8 @@ declare function scheduleWeek(team: string, date?: Date | string): Promise<APIRe
3476
5918
  * });
3477
5919
  * ```
3478
5920
  */
3479
- declare function scheduleMonth(team: TeamAbbrev, date?: Date | string): Promise<APIResponse<TeamScheduleMonth>>;
3480
- declare function scheduleMonth(team: string, date?: Date | string): Promise<APIResponse<TeamScheduleMonth>>;
5921
+ declare function scheduleMonth(team: TeamAbbrev, date?: Date | string): Promise<APIResult<TeamScheduleMonth>>;
5922
+ declare function scheduleMonth(team: string, date?: Date | string): Promise<APIResult<TeamScheduleMonth>>;
3481
5923
  /**
3482
5924
  * Returns the full season schedule for the provided team and season
3483
5925
  * @param team - The team abbreviation for the desired team (e.g., 'TOR', 'MTL', 'NYR')
@@ -3491,8 +5933,8 @@ declare function scheduleMonth(team: string, date?: Date | string): Promise<APIR
3491
5933
  * });
3492
5934
  * ```
3493
5935
  */
3494
- declare function scheduleSeason(team: TeamAbbrev, season?: Season): Promise<APIResponse<TeamScheduleSeason>>;
3495
- declare function scheduleSeason(team: string, season?: Season): Promise<APIResponse<TeamScheduleSeason>>;
5936
+ declare function scheduleSeason(team: TeamAbbrev, season?: Season$1): Promise<APIResult<TeamScheduleSeason>>;
5937
+ declare function scheduleSeason(team: string, season?: Season$1): Promise<APIResult<TeamScheduleSeason>>;
3496
5938
  /**
3497
5939
  * Access team schedule endpoints for different time periods
3498
5940
  * @description Get team schedules by season, week, or month
@@ -3532,297 +5974,154 @@ declare namespace index {
3532
5974
  }
3533
5975
 
3534
5976
  /**
3535
- * All valid NHL team abbreviations and their corresponding team IDs.
3536
- */
3537
- declare const TeamsEnum: {
3538
- /** Anaheim Ducks */
3539
- readonly ANA: 24;
3540
- /** Boston Bruins */
3541
- readonly BOS: 6;
3542
- /** Buffalo Sabres */
3543
- readonly BUF: 7;
3544
- /** Calgary Flames */
3545
- readonly CGY: 20;
3546
- /** Carolina Hurricanes */
3547
- readonly CAR: 12;
3548
- /** Chicago Blackhawks */
3549
- readonly CHI: 16;
3550
- /** Colorado Avalanche */
3551
- readonly COL: 21;
3552
- /** Columbus Blue Jackets */
3553
- readonly CBJ: 29;
3554
- /** Dallas Stars */
3555
- readonly DAL: 25;
3556
- /** Detroit Red Wings */
3557
- readonly DET: 17;
3558
- /** Edmonton Oilers */
3559
- readonly EDM: 22;
3560
- /** Florida Panthers */
3561
- readonly FLA: 13;
3562
- /** Los Angeles Kings */
3563
- readonly LAK: 26;
3564
- /** Minnesota Wild*/
3565
- readonly MIN: 30;
3566
- /** Montreal Canadiens */
3567
- readonly MTL: 8;
3568
- /** New Jersey Devils */
3569
- readonly NJD: 1;
3570
- /** Nashville Predators */
3571
- readonly NSH: 18;
3572
- /** New York Islanders */
3573
- readonly NYI: 2;
3574
- /** New York Rangers */
3575
- readonly NYR: 3;
3576
- /** Ottawa Senators */
3577
- readonly OTT: 9;
3578
- /** Philadelphia Flyers */
3579
- readonly PHI: 4;
3580
- /** Pittsburgh Penguins */
3581
- readonly PIT: 5;
3582
- /** San Jose Sharks */
3583
- readonly SJS: 28;
3584
- /** Seattle Kraken */
3585
- readonly SEA: 55;
3586
- /** St. Louis Blues */
3587
- readonly STL: 19;
3588
- /** Tampa Bay Lightning */
3589
- readonly TBL: 14;
3590
- /** Toronto Maple Leafs */
3591
- readonly TOR: 10;
3592
- /** Utah Hockey Club */
3593
- readonly UTA: 59;
3594
- /** Vancouver Canucks */
3595
- readonly VAN: 23;
3596
- /** Vegas Golden Knights */
3597
- readonly VGK: 54;
3598
- /** Winnipeg Jets */
3599
- readonly WPG: 52;
3600
- /** Washington Capitals */
3601
- readonly WSH: 15;
3602
- };
3603
- declare const TeamsReverseEnum: Record<(typeof TeamsEnum)[keyof typeof TeamsEnum], keyof typeof TeamsEnum>;
3604
- /**
3605
- * All inactive NHL teams and their corresponding team IDs.
3606
- */
3607
- declare const InactiveTeamsEnum: {
3608
- /** Atlanta Flames (not active) */
3609
- readonly AFM: 47;
3610
- /** Arizona Coyotes (not active) */
3611
- readonly ARI: 53;
3612
- /** Atlanta Thrashers (not active) */
3613
- readonly ATL: 11;
3614
- /** Brooklyn Americans - (not active) */
3615
- readonly BRK: 51;
3616
- /** California Golden Seals (aka Bay Area Seals) - (not active) */
3617
- readonly CGS: 56;
3618
- /** Cleveland Barons - (not active) */
3619
- readonly CLE: 49;
3620
- /** Colorado Rockies - (not active) */
3621
- readonly CLR: 35;
3622
- /** Detroit Cougars - (not active) */
3623
- readonly DCG: 40;
3624
- /** Detroit Falcons - (not active) */
3625
- readonly DFL: 50;
3626
- /** Hamilton Tigers - (not active) */
3627
- readonly HAM: 37;
3628
- /** Hartford Whalers - (not active) */
3629
- readonly HFD: 34;
3630
- /** Kansas City Scouts - (not active) */
3631
- readonly KCS: 48;
3632
- /** Montreal Maroons - (not active) */
3633
- readonly MMR: 43;
3634
- /** Minnesota North Stars - (not active) */
3635
- readonly MNS: 31;
3636
- /** Montreal Wanderers - (not active) */
3637
- readonly MWN: 41;
3638
- /** New York Americans - (not active) */
3639
- readonly NYA: 44;
3640
- /** California Seals (aka Oakland Seals) - (not active) */
3641
- readonly OAK: 46;
3642
- /** Phoenix Coyotes - (not active) */
3643
- readonly PHX: 27;
3644
- /** Pittsburgh Pirates - (not active) */
3645
- readonly PIR: 38;
3646
- /** Quebec Bulldogs - (not active) */
3647
- readonly QBD: 42;
3648
- /** Philadelphia Quakers - (not active) */
3649
- readonly QUA: 39;
3650
- /** Quebec Nordiques - (not active) */
3651
- readonly QUE: 32;
3652
- /** Ottawa Senators (original franchise) - (not active) */
3653
- readonly SEN: 36;
3654
- /** St. Louis Eagles - (not active) */
3655
- readonly SLE: 45;
3656
- /** Toronto Hockey Club (aka Toronto Arenas) - (not active) */
3657
- readonly TAN: 57;
3658
- /** Toronto St. Patricks - (not active) */
3659
- readonly TSP: 58;
3660
- /** Winnipeg Jets (original franchise) - (not active) */
3661
- readonly WIN: 33;
3662
- };
3663
- declare const InactiveTeamsReverseEnum: Record<(typeof InactiveTeamsEnum)[keyof typeof InactiveTeamsEnum], keyof typeof InactiveTeamsEnum>;
3664
- /**
3665
- * All valid NHL seasons in yyyyYYYY format.
3666
- */
3667
- declare const SeasonsArray: readonly [19171918, 19181919, 19191920, 19201921, 19211922, 19221923, 19231924, 19241925, 19251926, 19261927, 19271928, 19281929, 19291930, 19301931, 19311932, 19321933, 19331934, 19341935, 19351936, 19361937, 19371938, 19381939, 19391940, 19401941, 19411942, 19421943, 19431944, 19441945, 19451946, 19461947, 19471948, 19481949, 19491950, 19501951, 19511952, 19521953, 19531954, 19541955, 19551956, 19561957, 19571958, 19581959, 19591960, 19601961, 19611962, 19621963, 19631964, 19641965, 19651966, 19661967, 19671968, 19681969, 19691970, 19701971, 19711972, 19721973, 19731974, 19741975, 19751976, 19761977, 19771978, 19781979, 19791980, 19801981, 19811982, 19821983, 19831984, 19841985, 19851986, 19861987, 19871988, 19881989, 19891990, 19901991, 19911992, 19921993, 19931994, 19941995, 19951996, 19961997, 19971998, 19981999, 19992000, 20002001, 20012002, 20022003, 20032004, 20052006, 20062007, 20072008, 20082009, 20092010, 20102011, 20112012, 20122013, 20132014, 20142015, 20152016, 20162017, 20172018, 20182019, 20192020, 20202021, 20212022, 20222023, 20232024, 20242025, 20252026];
3668
- /**
3669
- * All valid NHL playoff series letters.
3670
- */
3671
- declare const SeriesLetterEnum: {
3672
- /** Atlantic Division Round 1: D1 vs WC# */
3673
- readonly A: "A";
3674
- /** Atlantic Division Round 1: D2 vs D3 */
3675
- readonly B: "B";
3676
- /** Metropolitan Division Round 1: D1 vs WC# */
3677
- readonly C: "C";
3678
- /** Metropolitan Division Round 1: D2 vs D3 */
3679
- readonly D: "D";
3680
- /** Central Division Round 1: D1 vs WC# */
3681
- readonly E: "E";
3682
- /** Central Division Round 1: D2 vs D3 */
3683
- readonly F: "F";
3684
- /** Pacific Division Round 1: D1 vs WC# */
3685
- readonly G: "G";
3686
- /** Pacific Division Round 1: D2 vs D3 */
3687
- readonly H: "H";
3688
- /** Atlantic Division Round 2: Aw vs Bw */
3689
- readonly I: "I";
3690
- /** Metropolitan Division Round 2: Cw vs Dw */
3691
- readonly J: "J";
3692
- /** Central Division Round 2: Ew vs Fw */
3693
- readonly K: "K";
3694
- /** Pacific Division Round 2: Gw vs Hw */
3695
- readonly L: "L";
3696
- /** Eastern Conference Finals */
3697
- readonly M: "M";
3698
- /** Western Conference Finals*/
3699
- readonly N: "N";
3700
- /** Stanley Cup Finals */
3701
- readonly O: "O";
3702
- };
5977
+ * ======================================================================
5978
+ * NHL video metadata from Brightcove, the NHL's video host.
5979
+ * Base URL: https://edge.api.brightcove.com/playback/v1
5980
+ * ======================================================================
5981
+ * Video ids come from `highlightClip` / `discreteClip` fields in Game
5982
+ * Center responses (e.g. `gc.game.landing` goals). The policy key is the
5983
+ * public one nhl.com's player sends.
5984
+ */
5985
+
5986
+ /** One rendition of a video */
5987
+ interface VideoSource {
5988
+ src: string;
5989
+ /** MIME type of a streaming manifest, e.g. application/x-mpegURL */
5990
+ type?: string;
5991
+ /** Container of a progressive download, e.g. MP4 */
5992
+ container?: string;
5993
+ codec?: string;
5994
+ width?: number;
5995
+ height?: number;
5996
+ }
5997
+ /** Metadata and playable sources for a video */
5998
+ interface VideoMetadata {
5999
+ id: string;
6000
+ title: string;
6001
+ description: string | null;
6002
+ longDescription: string | null;
6003
+ /** Length in milliseconds */
6004
+ duration: number;
6005
+ publishedAt: string;
6006
+ poster: string | null;
6007
+ thumbnail: string | null;
6008
+ /** The widest HTTPS MP4 rendition, or null when there is none */
6009
+ url: string | null;
6010
+ sources: VideoSource[];
6011
+ tags: string[];
6012
+ }
3703
6013
  /**
3704
- * All valid NHL playoff series letters grouped by round.
6014
+ * Get a video's title, descriptions and playable sources
6015
+ *
6016
+ * @param videoId - Brightcove video id, e.g. a goal's `highlightClip`
6017
+ * @returns Promise resolving to the video metadata; an unknown id gives a
6018
+ * NotFoundError result
6019
+ *
6020
+ * @example
6021
+ * const result = await video.metadata(6366156642112);
6022
+ * if (result.success) console.log(result.data.title, result.data.url);
3705
6023
  */
3706
- declare const SeriesLetterByRound: {
3707
- R1: string[];
3708
- R2: string[];
3709
- CF: string[];
3710
- SCF: string[];
3711
- };
6024
+ declare function metadata(videoId: string | number): Promise<APIResult<VideoMetadata>>;
6025
+
6026
+ type video_VideoMetadata = VideoMetadata;
6027
+ type video_VideoSource = VideoSource;
6028
+ declare const video_metadata: typeof metadata;
6029
+ declare namespace video {
6030
+ export { type video_VideoMetadata as VideoMetadata, type video_VideoSource as VideoSource, video_metadata as metadata };
6031
+ }
6032
+
3712
6033
  /**
3713
- * All valid NHL playoff series letters mapped to human-readable names.
3714
- */
3715
- declare const PlayoffSeriesEnum: {
3716
- Atlantic_R1_D1_vs_WC: string;
3717
- Atlantic_R1_D2_vs_D3: string;
3718
- Metropolitan_R1_D1_vs_WC: string;
3719
- Metropolitan_R1_D2_vs_D3: string;
3720
- Central_R1_D1_vs_WC: string;
3721
- Central_R1_D2_vs_D3: string;
3722
- Pacific_R1_D1_vs_WC: string;
3723
- Pacific_R1_D2_vs_D3: string;
3724
- Atlantic_R2_Aw_vs_Bw: string;
3725
- Metropolitan_R2_Cw_vs_Dw: string;
3726
- Central_R2_Ew_vs_Fw: string;
3727
- Pacific_R2_Gw_vs_Hw: string;
3728
- Eastern_Conference_Finals: string;
3729
- Western_Conference_Finals: string;
3730
- Stanley_Cup_Finals: string;
3731
- };
6034
+ * NHL API Client implementation
6035
+ * Internal client for making API requests to the NHL API
6036
+ */
6037
+
3732
6038
  /**
3733
- * All valid NHL game states.
6039
+ * Extended configuration for the NHL API client including error handling
3734
6040
  */
3735
- declare const GameStateEnum: {
3736
- /** Future */
3737
- readonly FUT: "FUT";
3738
- /** Live */
3739
- readonly LIV: "LIV";
3740
- /** Finished */
3741
- readonly FIN: "FIN";
6041
+ interface NHLClientWithErrorConfig extends NHLClientConfig {
6042
+ /**
6043
+ * Error handling configuration
6044
+ */
6045
+ errorConfig?: ErrorConfig;
6046
+ }
6047
+ /** Base URLs of the NHL APIs the library calls. */
6048
+ declare const BASE_URLS: {
6049
+ readonly gamecenter: "https://api-web.nhle.com/v1";
6050
+ readonly edgeStats: "https://api.nhle.com/stats/rest";
3742
6051
  };
3743
6052
  /**
3744
- * All valid NHL period types.
6053
+ * NHL API Client class for making API requests to the NHL API
6054
+ * Provides methods for sending GET requests to the NHL API with automatic
6055
+ * URL construction, query parameter handling, timeout management, and
6056
+ * comprehensive error handling using the ErrorHandler utility.
3745
6057
  */
3746
- declare const PeriodTypeEnum: {
3747
- /** Regulation */
3748
- readonly REG: "REG";
3749
- /** Overtime */
3750
- readonly OT: "OT";
3751
- /** Shootout */
3752
- readonly SO: "SO";
3753
- };
6058
+ declare class NHLClient {
6059
+ private options;
6060
+ private errorHandler;
6061
+ /**
6062
+ * Creates a new NHL API client instance
6063
+ *
6064
+ * Options left unset (timeout, language) follow the shared `config`
6065
+ * object at request time, so changing `config` after import still
6066
+ * applies to this client.
6067
+ *
6068
+ * @param baseURLOrOptions - Base URL, or client options
6069
+ * @param errorConfig - Optional error handling configuration
6070
+ *
6071
+ * @example
6072
+ * const client = new NHLClient('https://api-web.nhle.com/v1');
6073
+ * const slow = new NHLClient({ timeout: 15000, language: 'fr' });
6074
+ */
6075
+ constructor(baseURLOrOptions?: string | NHLClientWithErrorConfig, errorConfig?: ErrorConfig);
6076
+ /** Base URL, timeout, headers and language in effect for the next request. */
6077
+ private get config();
6078
+ /**
6079
+ * Helper to build URL with query parameters
6080
+ * @private
6081
+ */
6082
+ private buildUrl;
6083
+ /**
6084
+ * Send a GET request to the NHL API
6085
+ * @param endpoint - API endpoint path
6086
+ * @param params - Optional query parameters
6087
+ * @returns Promise resolving to an APIResponse containing either data or error
6088
+ */
6089
+ get<T = unknown>(endpoint: string, params?: Record<string, unknown>): Promise<APIResult<T>>;
6090
+ /**
6091
+ * Configure error handling behavior
6092
+ * @param config - Error configuration options
6093
+ */
6094
+ configureErrorHandling(config: Partial<ErrorConfig>): void;
6095
+ }
3754
6096
  /**
3755
- * All valid NHL game types.
3756
- */
3757
- declare const GameTypeEnum: {
3758
- /** Pre-season */
3759
- readonly PRE: 1;
3760
- /** Regular season */
3761
- readonly REG: 2;
3762
- /** Post-season (aka playoffs) */
3763
- readonly POST: 3;
3764
- /** All-Star Game (unconfirmed) */
3765
- readonly ASG: 4;
3766
- /** International (unconfirmed) */
3767
- readonly INTL: 19;
3768
- };
3769
- /** */
3770
- declare const SEASON_RANGE: {
3771
- START: number;
3772
- END: number;
3773
- };
3774
- /** */
3775
- declare const START_SEASON: number;
3776
- /** */
3777
- declare const END_SEASON: number;
3778
- /** */
3779
- declare const YEAR_RANGE: {
3780
- START: number;
3781
- END: number;
3782
- };
3783
- /** */
3784
- declare const START_YEAR: number;
3785
- /** */
3786
- declare const END_YEAR: number;
3787
- /** */
3788
- declare const CURRENT: {
3789
- SEASON: number;
3790
- YEAR: number;
3791
- };
3792
- /** */
3793
- declare const PLAYER_ID_RANGE: {
3794
- readonly MIN: 8444000;
3795
- readonly MAX: 8489999;
3796
- };
3797
- /** */
3798
- declare const TEAM_ID_RANGE: {
3799
- readonly MIN: 1;
3800
- readonly MAX: 59;
3801
- };
6097
+ * Factory function for backward compatibility
6098
+ * Creates a new NHL API client instance
6099
+ *
6100
+ * @param baseURL - Optional custom base URL or predefined API endpoint key
6101
+ * @param errorConfig - Optional error handling configuration
6102
+ * @returns A new NHL API client instance
6103
+ */
6104
+ declare function createNHLClient(baseURLOrOptions?: string | NHLClientWithErrorConfig, errorConfig?: ErrorConfig): NHLClient;
3802
6105
 
3803
- declare const nhl_CURRENT: typeof CURRENT;
3804
- declare const nhl_END_SEASON: typeof END_SEASON;
3805
- declare const nhl_END_YEAR: typeof END_YEAR;
3806
- declare const nhl_GameStateEnum: typeof GameStateEnum;
3807
- declare const nhl_GameTypeEnum: typeof GameTypeEnum;
3808
- declare const nhl_InactiveTeamsEnum: typeof InactiveTeamsEnum;
3809
- declare const nhl_InactiveTeamsReverseEnum: typeof InactiveTeamsReverseEnum;
3810
- declare const nhl_PLAYER_ID_RANGE: typeof PLAYER_ID_RANGE;
3811
- declare const nhl_PeriodTypeEnum: typeof PeriodTypeEnum;
3812
- declare const nhl_PlayoffSeriesEnum: typeof PlayoffSeriesEnum;
3813
- declare const nhl_SEASON_RANGE: typeof SEASON_RANGE;
3814
- declare const nhl_START_SEASON: typeof START_SEASON;
3815
- declare const nhl_START_YEAR: typeof START_YEAR;
3816
- declare const nhl_SeasonsArray: typeof SeasonsArray;
3817
- declare const nhl_SeriesLetterByRound: typeof SeriesLetterByRound;
3818
- declare const nhl_SeriesLetterEnum: typeof SeriesLetterEnum;
3819
- declare const nhl_TEAM_ID_RANGE: typeof TEAM_ID_RANGE;
3820
- declare const nhl_TeamsEnum: typeof TeamsEnum;
3821
- declare const nhl_TeamsReverseEnum: typeof TeamsReverseEnum;
3822
- declare const nhl_YEAR_RANGE: typeof YEAR_RANGE;
3823
- declare namespace nhl {
3824
- export { nhl_CURRENT as CURRENT, nhl_END_SEASON as END_SEASON, nhl_END_YEAR as END_YEAR, nhl_GameStateEnum as GameStateEnum, nhl_GameTypeEnum as GameTypeEnum, nhl_InactiveTeamsEnum as InactiveTeamsEnum, nhl_InactiveTeamsReverseEnum as InactiveTeamsReverseEnum, nhl_PLAYER_ID_RANGE as PLAYER_ID_RANGE, nhl_PeriodTypeEnum as PeriodTypeEnum, nhl_PlayoffSeriesEnum as PlayoffSeriesEnum, nhl_SEASON_RANGE as SEASON_RANGE, nhl_START_SEASON as START_SEASON, nhl_START_YEAR as START_YEAR, nhl_SeasonsArray as SeasonsArray, nhl_SeriesLetterByRound as SeriesLetterByRound, nhl_SeriesLetterEnum as SeriesLetterEnum, nhl_TEAM_ID_RANGE as TEAM_ID_RANGE, nhl_TeamsEnum as TeamsEnum, nhl_TeamsReverseEnum as TeamsReverseEnum, nhl_YEAR_RANGE as YEAR_RANGE };
3825
- }
6106
+ /**
6107
+ * Code-defined configuration for the NHL API client.
6108
+ *
6109
+ * Change these values in source when the application needs different
6110
+ * defaults.
6111
+ */
6112
+ type LogLevel = 'silent' | 'error' | 'warn' | 'info' | 'debug';
6113
+ interface NHLConfig {
6114
+ /** Request timeout in milliseconds. */
6115
+ timeout: number;
6116
+ /** Language code for localized API responses. */
6117
+ language: 'en' | 'fr';
6118
+ /** Logging level for the client. */
6119
+ logLevel: LogLevel;
6120
+ }
6121
+ /** Default configuration used by the shared NHL API clients. */
6122
+ declare const config: NHLConfig;
6123
+ /** Log the active code-defined configuration. */
6124
+ declare function logConfig(): void;
3826
6125
 
3827
6126
  declare const EDGE: {
3828
6127
  SaveLocationCategoryEnum: {
@@ -3895,4 +6194,15 @@ declare const EDGE: {
3895
6194
  };
3896
6195
  };
3897
6196
 
3898
- export { type CountryCode$1 as CountryCode, type DraftPicks, type DraftRankings, type DraftRound, type DraftTracker, EDGE, type EventId, type GameId, type GameMeta, type GameNumber, type GameState$1 as GameState, type GameType, type GamecenterBoxscore, type GamecenterLanding, type GamecenterPlayByPlay, type GamecenterReports, type GoalieStatsLeaders, type LeagueSchedule, type LocationInfo, nhl as NHL, type NHLDate, type NHLMonth, type NHLSeasons, type NHLStandings, type NHLStandingsSeason, type NetworkTVSchedule, type PPTReplayEvent, type PPTReplayGoal, type PartnerGameInfo, type PlayerGameLog, type PlayerId, type PlayerLanding, type PlayerSearchResult, type PlayerSpotlight, type PlayoffBracket, type PlayoffRound, type PlayoffSeries, type PlayoffSeriesMeta, type PlayoffSeriesSchedule, type PositionFilter, type PostalCode, type PostalCodeInfo, type SaveLocationCategory, type SaveLocationSort, type SavePercentage5v5Sort, type SavePercentageSort, type ScheduleCalendar, type Score, type Scoreboard, type Season, type SeriesLetter$1 as SeriesLetter, type ShotLocationCategory, type ShotLocationSort, type ShotSpeedSort, type SkaterStatsLeaders, type SkatersStrength, type SkatingDistanceSort, type SkatingSpeedSort, type TeamAbbrev, type TeamId, type TeamProspects, type TeamRoster, type TeamRosterSeasons, type TeamScheduleMonth, type TeamScheduleSeason, type TeamScheduleWeek, type TeamStats, type TeamStatsSeason, type WSCGameStory, type WSCPlayByPlay, type WSCPlayByPlayEvent, type WhereToWatch, type Year, type ZoneTimeSort, index$1 as adv, index as gc };
6197
+ type LogContext = unknown;
6198
+ /** Write a message when its level is enabled by the configured threshold. */
6199
+ declare function writeLog(level: Exclude<LogLevel, 'silent'>, message: string, context?: LogContext, threshold?: LogLevel): void;
6200
+ /** Simple level-aware logging wrappers for library messages. */
6201
+ declare const logger: {
6202
+ error: (message: string, context?: LogContext) => void;
6203
+ warn: (message: string, context?: LogContext) => void;
6204
+ info: (message: string, context?: LogContext) => void;
6205
+ debug: (message: string, context?: LogContext) => void;
6206
+ };
6207
+
6208
+ export { APIError, type APIResult, BASE_URLS, CayenneQueryBuilder, ClientError, type CountryCode, type DraftPicks, type DraftPositionCode, type DraftRankings, type DraftRound, type DraftTracker, EDGE, type EdgeByTheNumbers, type EdgeGoalieComparison, type EdgeGoalieDetail, type EdgeGoalieGame, type EdgeGoalieGameDecision, type EdgeGoalieLanding, type EdgeGoalieSavePercentage, type EdgeGoalieSavePercentage5v5, type EdgeGoalieSavePercentage5v5Top10, type EdgeGoalieSavePercentage5v5Top10Entry, type EdgeGoalieSavePercentageTop10, type EdgeGoalieSavePercentageTop10Entry, type EdgeGoalieShotLocation, type EdgeGoalieShotLocationTop10, type EdgeGoalieShotLocationTop10Entry, type EdgeMeasurement, type EdgeOverlay, type EdgePeriodDescriptor, type EdgePlayer, type EdgeSeason, type EdgeSkaterComparison, type EdgeSkaterDetail, type EdgeSkaterDistanceTop10, type EdgeSkaterDistanceTop10Entry, type EdgeSkaterLanding, type EdgeSkaterShotLocation, type EdgeSkaterShotLocationTop10, type EdgeSkaterShotLocationTop10Entry, type EdgeSkaterShotSpeed, type EdgeSkaterShotSpeedTop10, type EdgeSkaterShotSpeedTop10Entry, type EdgeSkaterSkatingDistance, type EdgeSkaterSkatingSpeed, type EdgeSkaterSpeedTop10, type EdgeSkaterSpeedTop10Entry, type EdgeSkaterZoneTime, type EdgeSkaterZoneTimeTop10, type EdgeSkaterZoneTimeTop10Entry, type EdgeTeam, type EdgeTeamComparison, type EdgeTeamDetail, type EdgeTeamLanding, type EdgeTeamLogos, type EdgeTeamShotLocation, type EdgeTeamShotLocationTop10, type EdgeTeamShotLocationTop10Entry, type EdgeTeamShotSpeed, type EdgeTeamShotSpeedTop10, type EdgeTeamShotSpeedTop10Entry, type EdgeTeamSkatingDistance, type EdgeTeamSkatingDistanceTop10, type EdgeTeamSkatingDistanceTop10Entry, type EdgeTeamSkatingSpeed, type EdgeTeamSkatingSpeedTop10, type EdgeTeamSkatingSpeedTop10Entry, type EdgeTeamZoneTime, type EdgeTeamZoneTimeTop10, type EdgeTeamZoneTimeTop10Entry, ErrorCategory, type ErrorConfig, type ErrorContext, ErrorHandler, LogLevel$1 as ErrorLogLevel, type EventId, type GameId, type GameMeta, type GameNumber, type GameState, type GameType, type GamecenterBoxscore, type GamecenterLanding, type GamecenterPlayByPlay, type GamecenterReports, type GoalieStatsLeaders, type LeagueSchedule, type LocalizedText, type LocationInfo, type LogContext, type LogLevel, NHLClient, type NHLClientConfig, type NHLClientWithErrorConfig, type NHLConfig, type NHLDate, NHLError, type NHLMonth, type NHLSeasons, type NHLStandings, type NHLStandingsSeason, NetworkError, type NetworkTVSchedule, NotFoundError, type PPTReplayEvent, type PPTReplayGoal, ParseError, type PartnerGameInfo, type PlayerGameLog, type PlayerId, type PlayerLanding, type PlayerSearchResult, type PlayerSpotlight, type PlayoffBracket, type PlayoffRound, type PlayoffSeries, type PlayoffSeriesMeta, type PlayoffSeriesSchedule, type PositionCode, type PositionFilter, type PostalCode, type PostalCodeInfo, RateLimitError, type SaveLocationCategory, type SaveLocationSort, type SavePercentage5v5Sort, type SavePercentageSort, type ScheduleCalendar, type Score, type Scoreboard, type Season$1 as Season, type SeriesLetter$1 as SeriesLetter, ServerError, type ShotLocationCategory, type ShotLocationSort, type ShotSpeedSort, type SkaterStatsLeaders, type SkatersStrength, type SkatingDistanceSort, type SkatingSpeedSort, type TeamAbbrev, type TeamId, type TeamProspects, type TeamRoster, type TeamRosterSeasons, type TeamScheduleMonth, type TeamScheduleSeason, type TeamScheduleWeek, type TeamStats, type TeamStatsSeason, ValidationError, type WSCGameStory, type WSCPlayByPlay, type WSCPlayByPlayEvent, type WhereToWatch, type Year, type ZoneTimeSort, index$2 as adv, config, createNHLClient, index as gc, logConfig, logger, index$1 as stats, video, writeLog };