nhl-api-ts 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -9
- package/dist/api/draft.d.mts +61 -0
- package/dist/api/draft.mjs +68 -0
- package/dist/api/edge.d.mts +221 -24
- package/dist/api/edge.mjs +276 -27
- package/dist/api/game-center.d.mts +63 -15
- package/dist/api/game-center.mjs +67 -8
- package/dist/api/helpers.d.mts +6 -6
- package/dist/api/helpers.mjs +6 -6
- package/dist/api/misc.d.mts +120 -6
- package/dist/api/misc.mjs +162 -7
- package/dist/api/players.d.mts +59 -7
- package/dist/api/players.mjs +85 -4
- package/dist/api/query/cayenne.d.mts +4 -0
- package/dist/api/query/cayenne.mjs +13 -0
- package/dist/api/query/sorting/sorting-options.d.mts +8 -0
- package/dist/api/query/sorting/sorting-options.mjs +30 -0
- package/dist/api/schedule.d.mts +36 -23
- package/dist/api/schedule.mjs +40 -16
- package/dist/api/standings.d.mts +3 -3
- package/dist/api/standings.mjs +4 -4
- package/dist/api/stats.d.mts +105 -16
- package/dist/api/stats.mjs +145 -41
- package/dist/api/teams.d.mts +48 -8
- package/dist/api/teams.mjs +59 -7
- package/dist/cli/colors.d.mts +2 -2
- package/dist/cli/colors.mjs +6 -2
- package/dist/cli/commands.mjs +521 -46
- package/dist/cli/run.mjs +7 -5
- package/dist/http-client.d.mts +2 -1
- package/dist/http-client.mjs +10 -3
- package/dist/index.d.mts +8 -2
- package/dist/index.mjs +3 -0
- package/dist/nhl-client.d.mts +70 -15
- package/dist/nhl-client.mjs +40 -17
- package/dist/types/common.d.mts +0 -1
- package/dist/types/draft.d.mts +97 -0
- package/dist/types/draft.mjs +1 -0
- package/dist/types/edge.d.mts +301 -5
- package/dist/types/game-center.d.mts +277 -119
- package/dist/types/index.d.mts +1 -0
- package/dist/types/misc.d.mts +101 -0
- package/dist/types/misc.mjs +0 -1
- package/dist/types/players.d.mts +23 -2
- package/dist/types/schedule.d.mts +50 -62
- package/dist/types/standings.d.mts +1 -2
- package/dist/types/stats.d.mts +313 -111
- package/dist/types/teams.d.mts +29 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils.mjs +3 -1
- package/package.json +7 -28
|
@@ -4,7 +4,7 @@ export interface BoxscoreGoalie {
|
|
|
4
4
|
sweaterNumber: number;
|
|
5
5
|
name: LocalizedString;
|
|
6
6
|
position: string;
|
|
7
|
-
/** Absent
|
|
7
|
+
/** Absent for preseason games */
|
|
8
8
|
starter?: boolean;
|
|
9
9
|
evenStrengthShotsAgainst?: string;
|
|
10
10
|
powerPlayShotsAgainst?: string;
|
|
@@ -14,7 +14,7 @@ export interface BoxscoreGoalie {
|
|
|
14
14
|
evenStrengthGoalsAgainst?: number;
|
|
15
15
|
powerPlayGoalsAgainst?: number;
|
|
16
16
|
shorthandedGoalsAgainst?: number;
|
|
17
|
-
/** Absent
|
|
17
|
+
/** Absent for preseason games */
|
|
18
18
|
pim?: number;
|
|
19
19
|
goalsAgainst?: number;
|
|
20
20
|
toi?: string;
|
|
@@ -108,6 +108,8 @@ export interface BoxscoreTeam {
|
|
|
108
108
|
placeNameWithPreposition: LocalizedString;
|
|
109
109
|
score?: number;
|
|
110
110
|
sog?: number;
|
|
111
|
+
/** Only present while the game is live */
|
|
112
|
+
radioLink?: string;
|
|
111
113
|
}
|
|
112
114
|
export interface DailyScores {
|
|
113
115
|
prevDate: string;
|
|
@@ -132,34 +134,35 @@ export interface DailyScoresGame {
|
|
|
132
134
|
awayTeam: DailyScoresTeam;
|
|
133
135
|
homeTeam: DailyScoresTeam;
|
|
134
136
|
gameCenterLink: string;
|
|
135
|
-
/** Absent
|
|
137
|
+
/** Absent before the game is played */
|
|
136
138
|
threeMinRecap?: string;
|
|
137
|
-
/** Absent
|
|
139
|
+
/** Absent before the game is played */
|
|
138
140
|
threeMinRecapFr?: string;
|
|
139
|
-
/** Absent
|
|
141
|
+
/** Absent before the game is played */
|
|
140
142
|
condensedGame?: string;
|
|
141
|
-
/** Absent
|
|
143
|
+
/** Absent before the game is played */
|
|
142
144
|
clock?: GameClock;
|
|
143
145
|
neutralSite: boolean;
|
|
144
146
|
venueTimezone: string;
|
|
145
|
-
/** Absent
|
|
147
|
+
/** Absent before the game is played */
|
|
146
148
|
period?: number;
|
|
147
|
-
/** Absent
|
|
149
|
+
/** Absent before the game is played */
|
|
148
150
|
periodDescriptor?: PeriodDescriptor;
|
|
149
|
-
/** Absent
|
|
151
|
+
/** Absent before the game is played */
|
|
150
152
|
gameOutcome?: GameOutcome;
|
|
151
|
-
/** Absent
|
|
153
|
+
/** Absent before the game is played */
|
|
152
154
|
goals?: GameGoal[];
|
|
153
|
-
/**
|
|
155
|
+
/** Only present before the game starts */
|
|
154
156
|
ticketsLink?: string;
|
|
155
|
-
/**
|
|
157
|
+
/** Only present before the game starts */
|
|
156
158
|
ticketsLinkFr?: string;
|
|
157
|
-
/**
|
|
159
|
+
/** Only present before the game starts */
|
|
158
160
|
teamLeaders?: GameTeamLeader[];
|
|
159
|
-
/**
|
|
161
|
+
/** Playoff games only */
|
|
160
162
|
seriesStatus?: SeriesStatus;
|
|
161
|
-
/**
|
|
163
|
+
/** Playoff games only */
|
|
162
164
|
seriesUrl?: string;
|
|
165
|
+
condensedGameFr?: string;
|
|
163
166
|
}
|
|
164
167
|
export interface DailyScoresGameWeek {
|
|
165
168
|
date: string;
|
|
@@ -178,9 +181,7 @@ export interface DailyScoresTvBroadcast {
|
|
|
178
181
|
network: string;
|
|
179
182
|
sequenceNumber: number;
|
|
180
183
|
logoUrls?: TeamLogo;
|
|
181
|
-
/** Absent when date=regular */
|
|
182
184
|
parentId?: number;
|
|
183
|
-
/** Absent when date=regular. Low sample count */
|
|
184
185
|
languageCode?: string;
|
|
185
186
|
}
|
|
186
187
|
export interface DelayedPenaltyDetails {
|
|
@@ -222,14 +223,14 @@ export interface DailyScoresTeam {
|
|
|
222
223
|
id: number;
|
|
223
224
|
name: LocalizedString;
|
|
224
225
|
abbrev: string;
|
|
225
|
-
/** Absent
|
|
226
|
+
/** Absent before the game is played */
|
|
226
227
|
score?: number;
|
|
227
|
-
/** Absent
|
|
228
|
+
/** Absent before the game is played */
|
|
228
229
|
sog?: number;
|
|
229
230
|
logo: string;
|
|
230
|
-
/**
|
|
231
|
+
/** Only present before the game starts */
|
|
231
232
|
record?: string;
|
|
232
|
-
/**
|
|
233
|
+
/** Only present before the game starts */
|
|
233
234
|
odds?: TeamOdd[];
|
|
234
235
|
}
|
|
235
236
|
export interface GameClock {
|
|
@@ -243,7 +244,6 @@ export interface GameEndPlay {
|
|
|
243
244
|
periodDescriptor: PeriodDescriptor;
|
|
244
245
|
timeInPeriod: string;
|
|
245
246
|
timeRemaining: string;
|
|
246
|
-
/** Absent when game=preseason; game=shootout */
|
|
247
247
|
situationCode?: OpenUnion<'0440' | '1551'>;
|
|
248
248
|
homeTeamDefendingSide: OpenUnion<'right' | 'left'>;
|
|
249
249
|
typeCode: number;
|
|
@@ -270,9 +270,7 @@ export interface GameGoal {
|
|
|
270
270
|
highlightClipSharingUrlFr?: string;
|
|
271
271
|
highlightClip?: number;
|
|
272
272
|
highlightClipFr?: number;
|
|
273
|
-
/** Absent when date=regular. Low sample count */
|
|
274
273
|
discreteClip?: number;
|
|
275
|
-
/** Absent when date=regular. Low sample count */
|
|
276
274
|
discreteClipFr?: number;
|
|
277
275
|
goalInGame?: number;
|
|
278
276
|
}
|
|
@@ -302,16 +300,16 @@ export interface GameLanding {
|
|
|
302
300
|
awayTeam: GameLandingAwayTeam;
|
|
303
301
|
homeTeam: GameLandingAwayTeam;
|
|
304
302
|
shootoutInUse: boolean;
|
|
305
|
-
/** Absent
|
|
303
|
+
/** Absent for playoff games */
|
|
306
304
|
maxPeriods?: number;
|
|
307
305
|
regPeriods: number;
|
|
308
306
|
otInUse: boolean;
|
|
309
307
|
tiesInUse: boolean;
|
|
310
|
-
/**
|
|
308
|
+
/** Only present before the game starts */
|
|
311
309
|
ticketsLink?: string;
|
|
312
|
-
/**
|
|
310
|
+
/** Only present before the game starts */
|
|
313
311
|
ticketsLinkFr?: string;
|
|
314
|
-
/**
|
|
312
|
+
/** Only present before the game starts */
|
|
315
313
|
matchup?: GameLandingMatchup;
|
|
316
314
|
periodDescriptor?: PeriodDescriptor;
|
|
317
315
|
summary?: GameLandingSummary;
|
|
@@ -325,10 +323,12 @@ export interface GameLandingAwayTeam {
|
|
|
325
323
|
placeNameWithPreposition: LocalizedString;
|
|
326
324
|
logo: string;
|
|
327
325
|
darkLogo: string;
|
|
328
|
-
/**
|
|
326
|
+
/** Only present before the game starts */
|
|
329
327
|
record?: string;
|
|
330
328
|
score?: number;
|
|
331
329
|
sog?: number;
|
|
330
|
+
/** Only present while the game is live */
|
|
331
|
+
radioLink?: string;
|
|
332
332
|
}
|
|
333
333
|
export interface GameLandingMatchup {
|
|
334
334
|
season: number;
|
|
@@ -357,29 +357,26 @@ export interface GameLandingScoringGoal {
|
|
|
357
357
|
assists: GoalAssist[];
|
|
358
358
|
isHome: boolean;
|
|
359
359
|
situationCode?: OpenUnion<'1551' | '0651' | '1331' | '0101' | '1451'>;
|
|
360
|
-
/** Absent
|
|
360
|
+
/** Absent for preseason games and older seasons */
|
|
361
361
|
highlightClipSharingUrl?: string;
|
|
362
|
-
/** Absent
|
|
362
|
+
/** Absent for preseason games and older seasons */
|
|
363
363
|
highlightClip?: number;
|
|
364
|
-
/** Absent
|
|
364
|
+
/** Absent for preseason games and older seasons */
|
|
365
365
|
pptReplayUrl?: string;
|
|
366
366
|
homeTeamDefendingSide?: OpenUnion<'left' | 'right'>;
|
|
367
|
-
/** Absent when game=playoff; game=preseason; game=shootout. Low sample count */
|
|
368
367
|
goalInGame?: number;
|
|
369
|
-
/** Absent when game=preseason; game=regular; game=shootout. Low sample count */
|
|
370
368
|
discreteClip?: number;
|
|
371
|
-
/** Absent when game=preseason; game=regular; game=shootout. Low sample count */
|
|
372
369
|
discreteClipFr?: number;
|
|
373
|
-
/** Absent when game=preseason; game=regular; game=shootout. Low sample count */
|
|
374
370
|
highlightClipSharingUrlFr?: string;
|
|
375
|
-
/** Absent when game=preseason; game=regular; game=shootout. Low sample count */
|
|
376
371
|
highlightClipFr?: number;
|
|
377
372
|
}
|
|
378
373
|
export interface GameLandingSummary {
|
|
379
374
|
scoring: GameLandingSummaryScoring[];
|
|
380
375
|
threeStars: GameLandingSummaryThreeStar[];
|
|
381
376
|
penalties: SummaryPenalty[];
|
|
382
|
-
/**
|
|
377
|
+
/** Only present while the game is live */
|
|
378
|
+
iceSurface?: SummaryIceSurface;
|
|
379
|
+
/** Only for games decided by a shootout */
|
|
383
380
|
shootout?: SummaryShootout;
|
|
384
381
|
}
|
|
385
382
|
export interface GameLandingSummaryScoring {
|
|
@@ -397,9 +394,9 @@ export interface GameLandingSummaryThreeStar {
|
|
|
397
394
|
goals?: number;
|
|
398
395
|
assists?: number;
|
|
399
396
|
points?: number;
|
|
400
|
-
/**
|
|
397
|
+
/** Goalies only */
|
|
401
398
|
goalsAgainstAverage?: number;
|
|
402
|
-
/**
|
|
399
|
+
/** Goalies only */
|
|
403
400
|
savePctg?: number;
|
|
404
401
|
}
|
|
405
402
|
export interface GameStory {
|
|
@@ -420,12 +417,12 @@ export interface GameStory {
|
|
|
420
417
|
awayTeam: GameStoryAwayTeam;
|
|
421
418
|
homeTeam: GameStoryAwayTeam;
|
|
422
419
|
shootoutInUse: boolean;
|
|
423
|
-
/** Absent
|
|
420
|
+
/** Absent for playoff games */
|
|
424
421
|
maxPeriods?: number;
|
|
425
422
|
regPeriods: number;
|
|
426
423
|
otInUse: boolean;
|
|
427
424
|
tiesInUse: boolean;
|
|
428
|
-
/**
|
|
425
|
+
/** Only present before the game starts */
|
|
429
426
|
preGameMatchup?: PreGameMatchup;
|
|
430
427
|
summary?: GameStorySummary;
|
|
431
428
|
periodDescriptor?: PeriodDescriptor;
|
|
@@ -437,10 +434,12 @@ export interface GameStoryAwayTeam {
|
|
|
437
434
|
abbrev: string;
|
|
438
435
|
placeName: LocalizedString;
|
|
439
436
|
logo: string;
|
|
440
|
-
/**
|
|
437
|
+
/** Only present before the game starts */
|
|
441
438
|
record?: string;
|
|
442
439
|
score?: number;
|
|
443
440
|
sog?: number;
|
|
441
|
+
/** Only present while the game is live */
|
|
442
|
+
radioLink?: string;
|
|
444
443
|
}
|
|
445
444
|
export interface PreGameMatchup {
|
|
446
445
|
skatingLeaders: PreGameMatchupSkatingLeaders;
|
|
@@ -459,7 +458,6 @@ export interface GameStoryTvBroadcast {
|
|
|
459
458
|
countryCode: string;
|
|
460
459
|
network: string;
|
|
461
460
|
sequenceNumber: number;
|
|
462
|
-
/** Absent when game=regular */
|
|
463
461
|
logoUrls?: TeamLogo;
|
|
464
462
|
}
|
|
465
463
|
export interface GameTeamLeader {
|
|
@@ -503,37 +501,31 @@ export interface GoalAssist {
|
|
|
503
501
|
export interface GoalDetails {
|
|
504
502
|
shotType: ShotType;
|
|
505
503
|
scoringPlayerId: number;
|
|
506
|
-
/** Absent when game=preseason; game=shootout */
|
|
507
504
|
scoringPlayerTotal?: number;
|
|
508
|
-
/** Absent
|
|
505
|
+
/** Absent for unassisted goals */
|
|
509
506
|
assist1PlayerId?: number;
|
|
510
|
-
/** Absent
|
|
507
|
+
/** Absent for unassisted goals */
|
|
511
508
|
assist1PlayerTotal?: number;
|
|
512
|
-
/** Absent
|
|
509
|
+
/** Absent unless the goal had two assists */
|
|
513
510
|
assist2PlayerId?: number;
|
|
514
|
-
/** Absent
|
|
511
|
+
/** Absent unless the goal had two assists */
|
|
515
512
|
assist2PlayerTotal?: number;
|
|
516
513
|
eventOwnerTeamId: number;
|
|
517
|
-
/** Absent when
|
|
514
|
+
/** Absent when the net was empty */
|
|
518
515
|
goalieInNetId?: number;
|
|
519
516
|
awayScore: number;
|
|
520
517
|
homeScore: number;
|
|
521
518
|
xCoord?: number;
|
|
522
519
|
yCoord?: number;
|
|
523
520
|
zoneCode?: ZoneCode;
|
|
524
|
-
/** Absent
|
|
521
|
+
/** Absent for preseason games and older seasons */
|
|
525
522
|
highlightClipSharingUrl?: string;
|
|
526
|
-
/** Absent
|
|
523
|
+
/** Absent for preseason games and older seasons */
|
|
527
524
|
highlightClip?: number;
|
|
528
|
-
/** Absent when game=overtime; game=playoff; game=preseason; game=regular; game=shootout. Low sample count */
|
|
529
525
|
goalInGame?: number;
|
|
530
|
-
/** Absent when game=preseason; game=regular; game=shootout. Low sample count */
|
|
531
526
|
discreteClip?: number;
|
|
532
|
-
/** Absent when game=preseason; game=regular; game=shootout. Low sample count */
|
|
533
527
|
discreteClipFr?: number;
|
|
534
|
-
/** Absent when game=preseason; game=regular; game=shootout. Low sample count */
|
|
535
528
|
highlightClipSharingUrlFr?: string;
|
|
536
|
-
/** Absent when game=preseason; game=regular; game=shootout. Low sample count */
|
|
537
529
|
highlightClipFr?: number;
|
|
538
530
|
}
|
|
539
531
|
export interface GoalieComparisonTeam {
|
|
@@ -545,27 +537,16 @@ export interface SeasonStatsGoalie {
|
|
|
545
537
|
teamId: number;
|
|
546
538
|
sweaterNumber: number;
|
|
547
539
|
name: LocalizedString;
|
|
548
|
-
/** Low sample count */
|
|
549
540
|
gamesPlayed?: number;
|
|
550
|
-
/** Low sample count */
|
|
551
541
|
wins?: number;
|
|
552
|
-
/** Low sample count */
|
|
553
542
|
losses?: number;
|
|
554
|
-
/** Low sample count */
|
|
555
543
|
otLosses?: number;
|
|
556
|
-
/** Low sample count */
|
|
557
544
|
shotsAgainst?: number;
|
|
558
|
-
/** Low sample count */
|
|
559
545
|
goalsAgainst?: number;
|
|
560
|
-
/** Low sample count */
|
|
561
546
|
goalsAgainstAvg?: number;
|
|
562
|
-
/** Low sample count */
|
|
563
547
|
savePctg?: number;
|
|
564
|
-
/** Low sample count */
|
|
565
548
|
shutouts?: number;
|
|
566
|
-
/** Low sample count */
|
|
567
549
|
saves?: number;
|
|
568
|
-
/** Low sample count */
|
|
569
550
|
toi?: string;
|
|
570
551
|
}
|
|
571
552
|
export interface GoalPlay {
|
|
@@ -579,7 +560,7 @@ export interface GoalPlay {
|
|
|
579
560
|
details: GoalDetails;
|
|
580
561
|
situationCode?: OpenUnion<'1551' | '0651' | '1331' | '1010' | '0101' | '1451'>;
|
|
581
562
|
homeTeamDefendingSide?: OpenUnion<'left' | 'right'>;
|
|
582
|
-
/** Absent
|
|
563
|
+
/** Absent for preseason games and older seasons */
|
|
583
564
|
pptReplayUrl?: string;
|
|
584
565
|
}
|
|
585
566
|
export interface HitDetails {
|
|
@@ -610,17 +591,11 @@ export interface GoalieLeader {
|
|
|
610
591
|
sweaterNumber: number;
|
|
611
592
|
headshot: string;
|
|
612
593
|
positionCode: PositionCode;
|
|
613
|
-
/** Low sample count */
|
|
614
594
|
gamesPlayed?: number;
|
|
615
|
-
/** Low sample count */
|
|
616
595
|
seasonPoints?: number;
|
|
617
|
-
/** Low sample count */
|
|
618
596
|
record?: string;
|
|
619
|
-
/** Low sample count */
|
|
620
597
|
gaa?: number;
|
|
621
|
-
/** Low sample count */
|
|
622
598
|
savePctg?: number;
|
|
623
|
-
/** Low sample count */
|
|
624
599
|
shutouts?: number;
|
|
625
600
|
}
|
|
626
601
|
export interface GoalieTeamTotals {
|
|
@@ -713,10 +688,13 @@ export interface PenaltyPlayer {
|
|
|
713
688
|
}
|
|
714
689
|
export interface PenaltyDetails {
|
|
715
690
|
typeCode: string;
|
|
716
|
-
descKey: OpenUnion<'elbowing' | 'holding-obstruction' | 'high-sticking' | 'interference' | 'holding-the-stick' | 'slashing' | 'cross-checking' | 'roughing' | 'holding' | 'hooking' | 'fighting' | 'tripping'>;
|
|
691
|
+
descKey: OpenUnion<'elbowing' | 'holding-obstruction' | 'high-sticking' | 'interference' | 'holding-the-stick' | 'slashing' | 'cross-checking' | 'roughing' | 'holding' | 'hooking' | 'fighting' | 'tripping' | 'instigator' | 'instigator-misconduct'>;
|
|
717
692
|
duration: number;
|
|
718
693
|
committedByPlayerId: number;
|
|
719
|
-
|
|
694
|
+
/** Absent for penalties nobody drew, e.g. misconducts */
|
|
695
|
+
drawnByPlayerId?: number;
|
|
696
|
+
/** Only when someone other than the committing player serves the penalty */
|
|
697
|
+
servedByPlayerId?: number;
|
|
720
698
|
eventOwnerTeamId: number;
|
|
721
699
|
xCoord?: number;
|
|
722
700
|
yCoord?: number;
|
|
@@ -728,8 +706,11 @@ export interface PenaltyEntry {
|
|
|
728
706
|
duration: number;
|
|
729
707
|
committedByPlayer: PenaltyPlayer;
|
|
730
708
|
teamAbbrev: LocalizedString;
|
|
731
|
-
|
|
732
|
-
|
|
709
|
+
/** Absent for penalties nobody drew, e.g. misconducts */
|
|
710
|
+
drawnBy?: PenaltyPlayer;
|
|
711
|
+
/** Name of the player serving the penalty, when not the one who committed it */
|
|
712
|
+
servedBy?: LocalizedString;
|
|
713
|
+
descKey: OpenUnion<'elbowing' | 'holding-obstruction' | 'high-sticking' | 'interference' | 'holding-the-stick' | 'slashing' | 'cross-checking' | 'roughing' | 'holding' | 'hooking' | 'fighting' | 'tripping' | 'instigator' | 'instigator-misconduct'>;
|
|
733
714
|
}
|
|
734
715
|
export interface PenaltyPlay {
|
|
735
716
|
eventId: number;
|
|
@@ -807,15 +788,18 @@ export interface PlayByPlay {
|
|
|
807
788
|
otInUse: boolean;
|
|
808
789
|
clock: GameClock;
|
|
809
790
|
displayPeriod: number;
|
|
810
|
-
/** Absent
|
|
791
|
+
/** Absent for playoff games */
|
|
811
792
|
maxPeriods?: number;
|
|
812
793
|
plays: Play[];
|
|
813
794
|
rosterSpots: PlayByPlayRosterSpot[];
|
|
814
795
|
regPeriods: number;
|
|
815
796
|
periodDescriptor?: PeriodDescriptor;
|
|
816
797
|
gameOutcome?: GameOutcome;
|
|
817
|
-
|
|
818
|
-
|
|
798
|
+
summary?: PlayByPlaySummary;
|
|
799
|
+
}
|
|
800
|
+
export interface PlayByPlaySummary {
|
|
801
|
+
/** Only present while the game is live */
|
|
802
|
+
iceSurface?: SummaryIceSurface;
|
|
819
803
|
}
|
|
820
804
|
export interface PlayByPlayTeam {
|
|
821
805
|
id: number;
|
|
@@ -827,6 +811,8 @@ export interface PlayByPlayTeam {
|
|
|
827
811
|
placeName: LocalizedString;
|
|
828
812
|
placeNameWithPreposition: LocalizedString;
|
|
829
813
|
sog?: number;
|
|
814
|
+
/** Only present while the game is live */
|
|
815
|
+
radioLink?: string;
|
|
830
816
|
}
|
|
831
817
|
export interface PlayByPlayRosterSpot {
|
|
832
818
|
teamId: number;
|
|
@@ -862,17 +848,16 @@ export interface RightRail {
|
|
|
862
848
|
seasonSeries: RightRailSeasonSeries[];
|
|
863
849
|
seasonSeriesWins: RightRailSeasonSeriesWins;
|
|
864
850
|
gameInfo: RightRailGameInfo;
|
|
865
|
-
/**
|
|
851
|
+
/** Only present before the game starts */
|
|
866
852
|
teamSeasonStats?: RightRailTeamSeasonStats;
|
|
867
|
-
/**
|
|
853
|
+
/** Only present before the game starts */
|
|
868
854
|
last10Record?: RightRailLast10Record;
|
|
869
855
|
linescore?: RightRailLinescore;
|
|
870
856
|
shotsByPeriod?: LinescoreByPeriod[];
|
|
871
857
|
teamGameStats?: SummaryTeamGameStat[];
|
|
872
858
|
gameReports?: RightRailGameReports;
|
|
873
|
-
/**
|
|
859
|
+
/** Playoff games only */
|
|
874
860
|
seasonSeriesFullCoverageUrl?: GameFullCoverageUrls;
|
|
875
|
-
/** Absent when game=preseason; game=shootout. Low sample count */
|
|
876
861
|
gameVideo?: RightRailGameVideo;
|
|
877
862
|
}
|
|
878
863
|
export interface RightRailGameInfo {
|
|
@@ -889,16 +874,15 @@ export interface RightRailGameReports {
|
|
|
889
874
|
faceoffComparison: string;
|
|
890
875
|
rosters: string;
|
|
891
876
|
shotSummary: string;
|
|
892
|
-
/** Absent
|
|
877
|
+
/** Absent for preseason games */
|
|
893
878
|
shiftChart?: string;
|
|
894
879
|
toiAway: string;
|
|
895
880
|
toiHome: string;
|
|
896
|
-
/**
|
|
881
|
+
/** Only for games decided by a shootout */
|
|
897
882
|
shootoutSummary?: string;
|
|
898
883
|
}
|
|
899
884
|
export interface RightRailGameVideo {
|
|
900
885
|
threeMinRecap: number;
|
|
901
|
-
/** Low sample count */
|
|
902
886
|
condensedGame?: number;
|
|
903
887
|
}
|
|
904
888
|
export interface RightRailLast10Record {
|
|
@@ -910,7 +894,7 @@ export interface RightRailLast10Record {
|
|
|
910
894
|
export interface RightRailLinescore {
|
|
911
895
|
byPeriod: LinescoreByPeriod[];
|
|
912
896
|
totals: LinescoreTotals;
|
|
913
|
-
/**
|
|
897
|
+
/** Only for games decided by a shootout */
|
|
914
898
|
shootout?: LinescoreShootout;
|
|
915
899
|
}
|
|
916
900
|
export interface RightRailSeasonSeries {
|
|
@@ -928,6 +912,8 @@ export interface RightRailSeasonSeries {
|
|
|
928
912
|
periodDescriptor?: PeriodDescriptor;
|
|
929
913
|
gameCenterLink: string;
|
|
930
914
|
gameOutcome: GameOutcome;
|
|
915
|
+
/** Only present while the game is live */
|
|
916
|
+
clock?: GameClock;
|
|
931
917
|
}
|
|
932
918
|
export interface GameFullCoverageUrls {
|
|
933
919
|
cs: string;
|
|
@@ -942,7 +928,7 @@ export interface GameFullCoverageUrls {
|
|
|
942
928
|
export interface RightRailSeasonSeriesWins {
|
|
943
929
|
awayTeamWins: number;
|
|
944
930
|
homeTeamWins: number;
|
|
945
|
-
/**
|
|
931
|
+
/** Playoff games only */
|
|
946
932
|
neededToWin?: number;
|
|
947
933
|
}
|
|
948
934
|
export interface RightRailTeamSeasonStats {
|
|
@@ -970,20 +956,15 @@ export interface ScoringGoal {
|
|
|
970
956
|
assists: GoalAssist[];
|
|
971
957
|
isHome: boolean;
|
|
972
958
|
situationCode?: OpenUnion<'1551' | '0651' | '1331' | '0101' | '1451'>;
|
|
973
|
-
/** Absent
|
|
959
|
+
/** Absent for preseason games and older seasons */
|
|
974
960
|
highlightClipSharingUrl?: string;
|
|
975
|
-
/** Absent
|
|
961
|
+
/** Absent for preseason games and older seasons */
|
|
976
962
|
highlightClip?: number;
|
|
977
963
|
homeTeamDefendingSide?: OpenUnion<'left' | 'right'>;
|
|
978
|
-
/** Absent when game=playoff; game=preseason; game=shootout. Low sample count */
|
|
979
964
|
goalInGame?: number;
|
|
980
|
-
/** Absent when game=preseason; game=regular; game=shootout. Low sample count */
|
|
981
965
|
discreteClip?: number;
|
|
982
|
-
/** Absent when game=preseason; game=regular; game=shootout. Low sample count */
|
|
983
966
|
discreteClipFr?: number;
|
|
984
|
-
/** Absent when game=preseason; game=regular; game=shootout. Low sample count */
|
|
985
967
|
highlightClipSharingUrlFr?: string;
|
|
986
|
-
/** Absent when game=preseason; game=regular; game=shootout. Low sample count */
|
|
987
968
|
highlightClipFr?: number;
|
|
988
969
|
}
|
|
989
970
|
export interface SeasonSeriesTeam {
|
|
@@ -1002,7 +983,7 @@ export interface ShiftEntry {
|
|
|
1002
983
|
duration: string | null;
|
|
1003
984
|
endTime: string;
|
|
1004
985
|
eventDescription: string | null;
|
|
1005
|
-
eventNumber: number;
|
|
986
|
+
eventNumber: number | null;
|
|
1006
987
|
firstName: string;
|
|
1007
988
|
gameId: number;
|
|
1008
989
|
hexValue: string;
|
|
@@ -1015,7 +996,6 @@ export interface ShiftEntry {
|
|
|
1015
996
|
teamId: number;
|
|
1016
997
|
teamName: string;
|
|
1017
998
|
typeCode: number;
|
|
1018
|
-
/** Low sample count */
|
|
1019
999
|
eventDetails?: string | null;
|
|
1020
1000
|
}
|
|
1021
1001
|
export interface ShootoutCompletePlay {
|
|
@@ -1072,38 +1052,23 @@ export interface ShotOnGoalPlay {
|
|
|
1072
1052
|
export interface SeasonStatsSkater {
|
|
1073
1053
|
playerId: number;
|
|
1074
1054
|
teamId: number;
|
|
1075
|
-
sweaterNumber
|
|
1055
|
+
sweaterNumber?: number;
|
|
1076
1056
|
name: LocalizedString;
|
|
1077
1057
|
position: string;
|
|
1078
|
-
/** Low sample count */
|
|
1079
1058
|
gamesPlayed?: number;
|
|
1080
|
-
/** Low sample count */
|
|
1081
1059
|
goals?: number;
|
|
1082
|
-
/** Low sample count */
|
|
1083
1060
|
assists?: number;
|
|
1084
|
-
/** Low sample count */
|
|
1085
1061
|
points?: number;
|
|
1086
|
-
/** Low sample count */
|
|
1087
1062
|
plusMinus?: number;
|
|
1088
|
-
/** Low sample count */
|
|
1089
1063
|
pim?: number;
|
|
1090
|
-
/** Low sample count */
|
|
1091
1064
|
avgPoints?: number;
|
|
1092
|
-
/** Low sample count */
|
|
1093
1065
|
avgTimeOnIce?: string;
|
|
1094
|
-
/** Low sample count */
|
|
1095
1066
|
gameWinningGoals?: number;
|
|
1096
|
-
/** Low sample count */
|
|
1097
1067
|
shots?: number;
|
|
1098
|
-
/** Low sample count */
|
|
1099
1068
|
shootingPctg?: number;
|
|
1100
|
-
/** Low sample count */
|
|
1101
1069
|
faceoffWinningPctg?: number;
|
|
1102
|
-
/** Low sample count */
|
|
1103
1070
|
powerPlayGoals?: number;
|
|
1104
|
-
/** Low sample count */
|
|
1105
1071
|
blockedShots?: number;
|
|
1106
|
-
/** Low sample count */
|
|
1107
1072
|
hits?: number;
|
|
1108
1073
|
}
|
|
1109
1074
|
export interface SkatingLeadersLeader {
|
|
@@ -1113,7 +1078,6 @@ export interface SkatingLeadersLeader {
|
|
|
1113
1078
|
}
|
|
1114
1079
|
export interface StoppageDetails {
|
|
1115
1080
|
reason: OpenUnion<'offside' | 'puck-frozen' | 'puck-in-netting' | 'goalie-stopped-after-sog' | 'puck-in-benches' | 'icing' | 'referee-or-linesman' | 'puck-in-crowd' | 'net-dislodged-offensive-skater' | 'tv-timeout' | 'hand-pass' | 'high-stick' | 'visitor-timeout' | 'objects-on-ice'>;
|
|
1116
|
-
/** Absent when game=overtime; game=playoff; game=preseason; game=regular; game=shootout */
|
|
1117
1081
|
secondaryReason?: OpenUnion<'tv-timeout' | 'visitor-timeout'>;
|
|
1118
1082
|
}
|
|
1119
1083
|
export interface StoppagePlay {
|
|
@@ -1128,6 +1092,26 @@ export interface StoppagePlay {
|
|
|
1128
1092
|
sortOrder: number;
|
|
1129
1093
|
details: StoppageDetails;
|
|
1130
1094
|
}
|
|
1095
|
+
/** The players on the ice right now, with their shift time on ice (`totalSOI`, seconds). */
|
|
1096
|
+
export interface SummaryIceSurface {
|
|
1097
|
+
awayTeam: IceSurfaceTeam;
|
|
1098
|
+
homeTeam: IceSurfaceTeam;
|
|
1099
|
+
}
|
|
1100
|
+
export interface IceSurfaceTeam {
|
|
1101
|
+
forwards: IceSurfacePlayer[];
|
|
1102
|
+
defensemen: IceSurfacePlayer[];
|
|
1103
|
+
goalies: IceSurfacePlayer[];
|
|
1104
|
+
/** Empty in every sample seen. */
|
|
1105
|
+
penaltyBox: unknown[];
|
|
1106
|
+
}
|
|
1107
|
+
export interface IceSurfacePlayer {
|
|
1108
|
+
playerId: number;
|
|
1109
|
+
name: LocalizedString;
|
|
1110
|
+
sweaterNumber: number;
|
|
1111
|
+
positionCode: PositionCode;
|
|
1112
|
+
headshot: string;
|
|
1113
|
+
totalSOI: number;
|
|
1114
|
+
}
|
|
1131
1115
|
export interface SummaryPenalty {
|
|
1132
1116
|
periodDescriptor: PeriodDescriptor;
|
|
1133
1117
|
penalties: PenaltyEntry[];
|
|
@@ -1156,9 +1140,9 @@ export interface SummaryThreeStar {
|
|
|
1156
1140
|
goals?: number;
|
|
1157
1141
|
assists?: number;
|
|
1158
1142
|
points?: number;
|
|
1159
|
-
/**
|
|
1143
|
+
/** Goalies only */
|
|
1160
1144
|
goalsAgainstAverage?: number;
|
|
1161
|
-
/**
|
|
1145
|
+
/** Goalies only */
|
|
1162
1146
|
savePctg?: number;
|
|
1163
1147
|
}
|
|
1164
1148
|
export interface TakeawayDetails {
|
|
@@ -1192,3 +1176,177 @@ export interface TeamSeasonStats {
|
|
|
1192
1176
|
goalsForPerGamePlayedRank: number;
|
|
1193
1177
|
goalsAgainstPerGamePlayedRank: number;
|
|
1194
1178
|
}
|
|
1179
|
+
export interface GameMeta {
|
|
1180
|
+
teams: MetaTeam[];
|
|
1181
|
+
seasonStates: GameMetaSeasonState;
|
|
1182
|
+
gameState: GameState;
|
|
1183
|
+
}
|
|
1184
|
+
export interface GameMetaSeasonState {
|
|
1185
|
+
date: string;
|
|
1186
|
+
gameType: GameType;
|
|
1187
|
+
season: number;
|
|
1188
|
+
}
|
|
1189
|
+
/** A team as `meta` endpoints describe it. */
|
|
1190
|
+
export interface MetaTeam {
|
|
1191
|
+
name: LocalizedString;
|
|
1192
|
+
tricode: string;
|
|
1193
|
+
teamId: number;
|
|
1194
|
+
teamSlug: string;
|
|
1195
|
+
}
|
|
1196
|
+
export interface PlayReplay {
|
|
1197
|
+
id: number;
|
|
1198
|
+
gameDate: string;
|
|
1199
|
+
awayTeam: PlayReplayTeam;
|
|
1200
|
+
homeTeam: PlayReplayTeam;
|
|
1201
|
+
gameState: GameState;
|
|
1202
|
+
gameType: GameType;
|
|
1203
|
+
/** Only present when the event is a goal */
|
|
1204
|
+
goal?: PlayReplayGoal;
|
|
1205
|
+
}
|
|
1206
|
+
export interface PlayReplayGoal {
|
|
1207
|
+
periodDescriptor: PeriodDescriptor;
|
|
1208
|
+
situationCode: string;
|
|
1209
|
+
strength: string;
|
|
1210
|
+
playerId: number;
|
|
1211
|
+
firstName: LocalizedString;
|
|
1212
|
+
lastName: LocalizedString;
|
|
1213
|
+
name: LocalizedString;
|
|
1214
|
+
teamAbbrev: LocalizedString;
|
|
1215
|
+
headshot: string;
|
|
1216
|
+
highlightClip: number;
|
|
1217
|
+
logoUrl: string;
|
|
1218
|
+
highlightClipSharingUrl: string;
|
|
1219
|
+
goalsToDate: number;
|
|
1220
|
+
sweaterNumber: number;
|
|
1221
|
+
awayScore: number;
|
|
1222
|
+
homeScore: number;
|
|
1223
|
+
leadingTeamAbbrev: LocalizedString;
|
|
1224
|
+
timeInPeriod: string;
|
|
1225
|
+
shotType: ShotType;
|
|
1226
|
+
goalModifier: string;
|
|
1227
|
+
assists: GoalAssist[];
|
|
1228
|
+
pptReplayUrl: string;
|
|
1229
|
+
homeTeamDefendingSide: OpenUnion<'left' | 'right'>;
|
|
1230
|
+
isHome: boolean;
|
|
1231
|
+
eventId: number;
|
|
1232
|
+
}
|
|
1233
|
+
export interface PlayReplayTeam {
|
|
1234
|
+
id: number;
|
|
1235
|
+
name: LocalizedString;
|
|
1236
|
+
abbrev: string;
|
|
1237
|
+
placeName: LocalizedString;
|
|
1238
|
+
placeNameWithPreposition: LocalizedString;
|
|
1239
|
+
logo: string;
|
|
1240
|
+
darkLogo: string;
|
|
1241
|
+
}
|
|
1242
|
+
export interface Scoreboard {
|
|
1243
|
+
focusedDate: string;
|
|
1244
|
+
focusedDateCount: number;
|
|
1245
|
+
gamesByDate: ScoreboardDate[];
|
|
1246
|
+
}
|
|
1247
|
+
export interface ScoreboardDate {
|
|
1248
|
+
date: string;
|
|
1249
|
+
games: ScoreboardGame[];
|
|
1250
|
+
}
|
|
1251
|
+
export interface ScoreboardGame {
|
|
1252
|
+
id: number;
|
|
1253
|
+
season: number;
|
|
1254
|
+
gameType: GameType;
|
|
1255
|
+
gameDate: string;
|
|
1256
|
+
gameCenterLink: string;
|
|
1257
|
+
venue: LocalizedString;
|
|
1258
|
+
startTimeUTC: string;
|
|
1259
|
+
easternUTCOffset: string;
|
|
1260
|
+
venueUTCOffset: string;
|
|
1261
|
+
tvBroadcasts: DailyScoresTvBroadcast[];
|
|
1262
|
+
gameState: GameState;
|
|
1263
|
+
gameScheduleState: GameScheduleState;
|
|
1264
|
+
awayTeam: ScoreboardTeam;
|
|
1265
|
+
homeTeam: ScoreboardTeam;
|
|
1266
|
+
/** Absent before the game starts */
|
|
1267
|
+
period?: number;
|
|
1268
|
+
/** Absent before the game starts */
|
|
1269
|
+
periodDescriptor?: PeriodDescriptor;
|
|
1270
|
+
/** Only present while the game is live */
|
|
1271
|
+
clock?: GameClock;
|
|
1272
|
+
/** Absent before the game is played */
|
|
1273
|
+
threeMinRecap?: string;
|
|
1274
|
+
/** Absent before the game is played */
|
|
1275
|
+
threeMinRecapFr?: string;
|
|
1276
|
+
/** Only present before the game starts */
|
|
1277
|
+
ticketsLink?: string;
|
|
1278
|
+
/** Only present before the game starts */
|
|
1279
|
+
ticketsLinkFr?: string;
|
|
1280
|
+
/** Playoff games only */
|
|
1281
|
+
seriesStatus?: ScoreboardSeriesStatus;
|
|
1282
|
+
}
|
|
1283
|
+
export interface ScoreboardSeriesStatus {
|
|
1284
|
+
round: number;
|
|
1285
|
+
seriesAbbrev: string;
|
|
1286
|
+
game: number;
|
|
1287
|
+
topSeedTeamAbbrev: string;
|
|
1288
|
+
topSeedWins: number;
|
|
1289
|
+
bottomSeedTeamAbbrev: string;
|
|
1290
|
+
bottomSeedWins: number;
|
|
1291
|
+
}
|
|
1292
|
+
export interface ScoreboardTeam {
|
|
1293
|
+
id: number;
|
|
1294
|
+
name: LocalizedString;
|
|
1295
|
+
commonName: LocalizedString;
|
|
1296
|
+
placeNameWithPreposition: LocalizedString;
|
|
1297
|
+
abbrev: string;
|
|
1298
|
+
/** Absent before the game starts */
|
|
1299
|
+
score?: number;
|
|
1300
|
+
/** Only present while the game is live */
|
|
1301
|
+
sog?: number;
|
|
1302
|
+
logo: string;
|
|
1303
|
+
/** Only present before the game starts */
|
|
1304
|
+
record?: string;
|
|
1305
|
+
}
|
|
1306
|
+
/** A play from `wsc/play-by-play`. Flat, unlike {@link Play}: event details sit on the play itself. */
|
|
1307
|
+
export interface WscPlay {
|
|
1308
|
+
id: number;
|
|
1309
|
+
eventId: number;
|
|
1310
|
+
period: number;
|
|
1311
|
+
timeInPeriod: string;
|
|
1312
|
+
secondsRemaining: number;
|
|
1313
|
+
typeCode: number;
|
|
1314
|
+
typeDescKey: OpenUnion<'shot-on-goal' | 'penalty' | 'goal' | 'period-start' | 'faceoff' | 'giveaway' | 'missed-shot' | 'takeaway' | 'blocked-shot' | 'hit' | 'delayed-penalty' | 'period-end' | 'game-end'>;
|
|
1315
|
+
sortOrder: number;
|
|
1316
|
+
shotType?: ShotType;
|
|
1317
|
+
shootingPlayerId?: number;
|
|
1318
|
+
goalieInNetId?: number;
|
|
1319
|
+
eventOwnerTeamId?: number;
|
|
1320
|
+
awaySOG?: number;
|
|
1321
|
+
homeSOG?: number;
|
|
1322
|
+
penaltyTypeCode?: string;
|
|
1323
|
+
descKey?: OpenUnion<'elbowing' | 'holding-obstruction' | 'high-sticking' | 'interference' | 'holding-the-stick' | 'slashing' | 'cross-checking' | 'roughing' | 'holding' | 'hooking' | 'fighting' | 'tripping'>;
|
|
1324
|
+
duration?: number;
|
|
1325
|
+
committedByPlayerId?: number;
|
|
1326
|
+
drawnByPlayerId?: number;
|
|
1327
|
+
goalModifier?: string;
|
|
1328
|
+
strength?: string;
|
|
1329
|
+
scoringPlayerId?: number;
|
|
1330
|
+
assist1PlayerId?: number;
|
|
1331
|
+
assist2PlayerId?: number;
|
|
1332
|
+
awayScore?: number;
|
|
1333
|
+
homeScore?: number;
|
|
1334
|
+
strengthCode?: number;
|
|
1335
|
+
goalCode?: number;
|
|
1336
|
+
scoringPlayerTotal?: number;
|
|
1337
|
+
assist1PlayerTotal?: number;
|
|
1338
|
+
assist2PlayerTotal?: number;
|
|
1339
|
+
situationCode?: string;
|
|
1340
|
+
homeTeamDefendingSide?: OpenUnion<'left' | 'right'>;
|
|
1341
|
+
utc?: string;
|
|
1342
|
+
losingPlayerId?: number;
|
|
1343
|
+
winningPlayerId?: number;
|
|
1344
|
+
xCoord?: number;
|
|
1345
|
+
yCoord?: number;
|
|
1346
|
+
zoneCode?: ZoneCode;
|
|
1347
|
+
playerId?: number;
|
|
1348
|
+
reason?: OpenUnion<'hit-right-post' | 'wide-right' | 'blocked' | 'high-and-wide-right' | 'wide-left' | 'above-crossbar' | 'short' | 'high-and-wide-left' | 'teammate-blocked' | 'hit-crossbar' | 'hit-left-post'>;
|
|
1349
|
+
blockingPlayerId?: number;
|
|
1350
|
+
hittingPlayerId?: number;
|
|
1351
|
+
hitteePlayerId?: number;
|
|
1352
|
+
}
|