fitzroy 1.8.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. package/README.md +45 -17
  2. package/dist/cli.js +4568 -4235
  3. package/dist/index.d.ts +177 -120
  4. package/dist/index.js +2076 -1744
  5. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -25,13 +25,66 @@ declare function ok<T>(data: T): Ok<T>;
25
25
  /** Create a failed result. */
26
26
  declare function err<E>(error: E): Err<E>;
27
27
  /**
28
+ * Result composition combinators.
29
+ *
30
+ * Use these to chain `Result`-returning operations without the
31
+ * `if (!result.success) return result` boilerplate that otherwise
32
+ * accumulates at every call site. Free-function namespace style: the
33
+ * underlying discriminated union is unchanged, so existing
34
+ * `result.success` narrowing still works alongside.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const adapterR = dispatch(matchRegistry, "match", query);
39
+ * const matchesR = await Result.flatMapAsync(adapterR, (a) => a.fetchMatches(query));
40
+ * return Result.map(matchesR, (ms) => filterMatches(ms, query));
41
+ * ```
42
+ */
43
+ declare const Result: {
44
+ /** Transform the success value of a Result. Errors pass through unchanged. */
45
+ map<
46
+ T,
47
+ U,
48
+ E
49
+ >(result: Result<T, E>, fn: (value: T) => U): Result<U, E>;
50
+ /** Chain a Result-returning function. Errors short-circuit. */
51
+ flatMap<
52
+ T,
53
+ U,
54
+ E
55
+ >(result: Result<T, E>, fn: (value: T) => Result<U, E>): Result<U, E>;
56
+ /**
57
+ * Chain an async Result-returning function. Errors short-circuit without
58
+ * invoking `fn`.
59
+ */
60
+ flatMapAsync<
61
+ T,
62
+ U,
63
+ E
64
+ >(result: Result<T, E>, fn: (value: T) => Promise<Result<U, E>>): Promise<Result<U, E>>;
65
+ /**
66
+ * Collect an array of Results into a single Result of an array. Returns
67
+ * the first error encountered, or `ok` of all successful values.
68
+ */
69
+ all<
70
+ T,
71
+ E
72
+ >(results: readonly Result<T, E>[]): Result<T[], E>;
73
+ /** Transform the error value of a Result. Successes pass through unchanged. */
74
+ mapErr<
75
+ T,
76
+ E,
77
+ F
78
+ >(result: Result<T, E>, fn: (error: E) => F): Result<T, F>;
79
+ };
80
+ /**
28
81
  * Shared domain types for fitzRoy-ts.
29
82
  *
30
83
  * Define all domain types here before writing implementation code.
31
84
  * Types are the single source of truth for the data model.
32
85
  */
33
86
  /** AFL competition codes. */
34
- type CompetitionCode = "AFLM" | "AFLW";
87
+ type CompetitionCode = "AFLM" | "AFLW" | "VFL" | "VFLW";
35
88
  /** Round classification. */
36
89
  type RoundType = "HomeAndAway" | "Finals";
37
90
  /** Supported data sources mirroring the R package's `source` parameter. */
@@ -45,12 +98,14 @@ interface QuarterScore {
45
98
  readonly points: number;
46
99
  }
47
100
  /**
48
- * A completed or in-progress match with scores.
101
+ * An AFL match in any state — scheduled, in-progress, or completed.
49
102
  *
50
- * One row per match. Quarter scores are optional historical data
51
- * from AFL Tables may not include them.
103
+ * One row per match. A "fixture" is a Match with `status="Upcoming"` and
104
+ * null score fields; a completed match has the score fields populated.
105
+ * Quarter scores are nullable — historical data from AFL Tables may not
106
+ * include them.
52
107
  */
53
- interface MatchResult {
108
+ interface Match {
54
109
  /** Provider-assigned match identifier (e.g. AFL API `matchProviderId`). */
55
110
  readonly matchId: string;
56
111
  readonly season: number;
@@ -62,15 +117,18 @@ interface MatchResult {
62
117
  readonly venue: string;
63
118
  readonly homeTeam: string;
64
119
  readonly awayTeam: string;
65
- /** Total goals-behinds-points for each team. */
66
- readonly homeGoals: number;
67
- readonly homeBehinds: number;
68
- readonly homePoints: number;
69
- readonly awayGoals: number;
70
- readonly awayBehinds: number;
71
- readonly awayPoints: number;
72
- /** Positive = home win, negative = away win. */
73
- readonly margin: number;
120
+ /**
121
+ * Total goals-behinds-points for each team. Null when the match has not
122
+ * yet been played (status="Upcoming").
123
+ */
124
+ readonly homeGoals: number | null;
125
+ readonly homeBehinds: number | null;
126
+ readonly homePoints: number | null;
127
+ readonly awayGoals: number | null;
128
+ readonly awayBehinds: number | null;
129
+ readonly awayPoints: number | null;
130
+ /** Positive = home win, negative = away win. Null for upcoming matches. */
131
+ readonly margin: number | null;
74
132
  /** Per-quarter scores (null when unavailable). */
75
133
  readonly q1Home: QuarterScore | null;
76
134
  readonly q2Home: QuarterScore | null;
@@ -200,19 +258,6 @@ interface PlayerStats {
200
258
  readonly scoreLaunches: number | null;
201
259
  readonly source: DataSource;
202
260
  }
203
- /** A scheduled match (may not yet have scores). */
204
- interface Fixture {
205
- readonly matchId: string;
206
- readonly season: number;
207
- readonly roundNumber: number;
208
- readonly roundType: RoundType;
209
- readonly date: Date;
210
- readonly venue: string;
211
- readonly homeTeam: string;
212
- readonly awayTeam: string;
213
- readonly status: MatchStatus;
214
- readonly competition: CompetitionCode;
215
- }
216
261
  /** A single player's position in a match lineup. */
217
262
  interface LineupPlayer {
218
263
  readonly playerId: string;
@@ -279,6 +324,14 @@ interface SquadPlayer {
279
324
  readonly draftType: string | null;
280
325
  readonly debutYear: number | null;
281
326
  readonly recruitedFrom: string | null;
327
+ /**
328
+ * Career games played. Populated by FootyWire and AFL Tables (their
329
+ * team-list pages report career counts). `null` for `afl-api` — the
330
+ * squad endpoint doesn't carry career stats.
331
+ */
332
+ readonly gamesPlayed?: number | null;
333
+ /** Career goals. Populated alongside `gamesPlayed`; same source caveat. */
334
+ readonly goals?: number | null;
282
335
  }
283
336
  /** A team's squad for a given season. */
284
337
  interface Squad {
@@ -324,7 +377,7 @@ interface PlayerDetailsQuery {
324
377
  readonly competition?: CompetitionCode | undefined;
325
378
  }
326
379
  /** Types of awards available. */
327
- type AwardType = "brownlow" | "all-australian" | "rising-star";
380
+ type AwardType = "brownlow" | "all-australian" | "rising-star" | "coleman" | "coaches";
328
381
  /** A Brownlow Medal vote tally for a player. */
329
382
  interface BrownlowVote {
330
383
  readonly type: "brownlow";
@@ -361,15 +414,35 @@ interface RisingStarNomination {
361
414
  readonly behinds: number | null;
362
415
  readonly tackles: number | null;
363
416
  }
417
+ /** A Coleman Medal leaderboard entry (top goal-kickers per season). */
418
+ interface ColemanLeader {
419
+ readonly type: "coleman";
420
+ readonly season: number;
421
+ /** 1 = season leader, 2 = runner-up, etc. */
422
+ readonly position: number;
423
+ readonly player: string;
424
+ readonly team: string;
425
+ readonly goals: number;
426
+ readonly gamesPlayed: number | null;
427
+ }
364
428
  /** Discriminated union of award types. */
365
- type Award = BrownlowVote | AllAustralianSelection | RisingStarNomination;
429
+ type Award = BrownlowVote | AllAustralianSelection | RisingStarNomination | ColemanLeader | CoachesVote;
366
430
  /** Query parameters for fetching awards. */
367
431
  interface AwardQuery {
368
432
  readonly award: AwardType;
369
433
  readonly season: number;
434
+ /** Coaches votes are competition-scoped; defaults to AFLM. Other awards ignore. */
435
+ readonly competition?: CompetitionCode | undefined;
436
+ /** Coaches votes only — narrow to a specific round. */
437
+ readonly round?: number | undefined;
438
+ /** Coaches votes only — narrow to matches involving a team. */
439
+ readonly team?: string | undefined;
440
+ /** Coleman only — limit to top N goal-kickers (default: all players who scored). */
441
+ readonly limit?: number | undefined;
370
442
  }
371
443
  /** AFLCA coaches votes for a player in a single match. */
372
444
  interface CoachesVote {
445
+ readonly type: "coaches";
373
446
  readonly season: number;
374
447
  readonly round: number;
375
448
  readonly homeTeam: string;
@@ -391,10 +464,23 @@ interface SeasonRoundQuery {
391
464
  readonly round?: number | undefined;
392
465
  readonly competition?: CompetitionCode | undefined;
393
466
  }
394
- /** Query for a specific match. */
467
+ /**
468
+ * Unified query for matches in any temporal scope.
469
+ *
470
+ * - `season` is required (matches are always season-scoped)
471
+ * - `round` narrows to one round
472
+ * - `matchId` narrows to one specific match
473
+ * - `team` filters to matches involving the named team (home or away)
474
+ * - `status` filters by match state (e.g. "Upcoming" for fixtures only)
475
+ */
395
476
  interface MatchQuery {
396
477
  readonly source: DataSource;
397
- readonly matchId: string;
478
+ readonly season: number;
479
+ readonly round?: number | undefined;
480
+ readonly matchId?: string | undefined;
481
+ readonly team?: string | undefined;
482
+ readonly status?: MatchStatus | undefined;
483
+ readonly competition?: CompetitionCode | undefined;
398
484
  }
399
485
  /** Query for player stats (by season/round or specific match). */
400
486
  interface PlayerStatsQuery {
@@ -426,8 +512,10 @@ interface TeamQuery {
426
512
  }
427
513
  /** Query for a team's squad. */
428
514
  interface SquadQuery {
429
- readonly teamId: string;
515
+ /** Canonical team name (e.g. "Carlton"). Adapters handle their own translation. */
516
+ readonly team: string;
430
517
  readonly season: number;
518
+ readonly source?: DataSource | undefined;
431
519
  readonly competition?: CompetitionCode | undefined;
432
520
  }
433
521
  /** Summary type for team statistics. */
@@ -452,48 +540,23 @@ interface TeamStatsQuery {
452
540
  readonly summaryType?: TeamStatsSummaryType | undefined;
453
541
  }
454
542
  /**
455
- * Fetch awards data from FootyWire.
543
+ * Fetch awards data for a season.
456
544
  *
457
- * @param query - Award type and season.
545
+ * @param query - Award type and season; some award types accept additional
546
+ * filters (see {@link AwardQuery}).
458
547
  * @returns Array of award entries (discriminated union by `type` field).
459
548
  *
460
549
  * @example
461
550
  * ```ts
462
- * const result = await fetchAwards({ award: "brownlow", season: 2023 });
551
+ * await fetchAwards({ award: "brownlow", season: 2023 });
552
+ * await fetchAwards({ award: "coleman", season: 2024, limit: 10 });
553
+ * await fetchAwards({ award: "coaches", season: 2024, round: 3 });
463
554
  * ```
464
555
  */
465
556
  declare function fetchAwards(query: AwardQuery): Promise<Result<Award[], Error>>;
466
557
  /**
467
- * Fetch AFLCA coaches votes for a season (and optionally a specific round/team).
468
- *
469
- * Scrapes the AFL Coaches Association website for vote data. Available from
470
- * approximately 2006 onwards for AFLM and 2018 onwards for AFLW.
471
- *
472
- * @param query - Season, optional round, competition, and team filter.
473
- * @returns Array of coaches vote records.
474
- *
475
- * @example
476
- * ```ts
477
- * const result = await fetchCoachesVotes({ season: 2024, competition: "AFLM" });
478
- * if (result.success) {
479
- * console.log(result.data); // CoachesVote[]
480
- * }
481
- * ```
482
- */
483
- declare function fetchCoachesVotes(query: CoachesVoteQuery): Promise<Result<CoachesVote[], Error>>;
484
- /**
485
- * Fetch fixture (schedule) data for a season.
486
- *
487
- * @param query - Source, season, optional round, and competition.
488
- * @returns Array of fixture entries.
489
- */
490
- declare function fetchFixture(query: SeasonRoundQuery): Promise<Result<Fixture[], Error>>;
491
- /**
492
558
  * Fetch ladder standings for a season (optionally for a specific round).
493
559
  *
494
- * @param query - Source, season, optional round, and competition.
495
- * @returns Ladder standings.
496
- *
497
560
  * @example
498
561
  * ```ts
499
562
  * const result = await fetchLadder({ source: "afl-api", season: 2024, round: 10 });
@@ -505,31 +568,31 @@ declare function fetchLadder2(query: LadderQuery): Promise<Result<Ladder, Error>
505
568
  *
506
569
  * When `matchId` is provided, returns a single-element array for that match.
507
570
  * When omitted, returns lineups for all matches in the round.
508
- *
509
- * @param query - Source, season, round, optional matchId, and competition.
510
- * @returns Array of lineups.
511
571
  */
512
572
  declare function fetchLineup(query: LineupQuery): Promise<Result<Lineup[], Error>>;
513
573
  /**
514
- * Fetch match results for a season (and optionally a specific round).
515
- *
516
- * @param query - Source, season, optional round, and competition.
517
- * @returns Array of match results.
574
+ * Fetch matches matching the query.
518
575
  *
519
576
  * @example
520
577
  * ```ts
521
- * const result = await fetchMatchResults({ source: "afl-api", season: 2025, competition: "AFLM" });
578
+ * // All AFLM matches in 2025 round 3
579
+ * await fetchMatches({ source: "afl-api", season: 2025, round: 3 });
580
+ *
581
+ * // Only upcoming matches (a "fixture" view)
582
+ * await fetchMatches({ source: "afl-api", season: 2025, status: "Upcoming" });
583
+ *
584
+ * // One specific match by id
585
+ * await fetchMatches({ source: "afl-api", season: 2025, matchId: "CD_M..." });
522
586
  * ```
523
587
  */
524
- declare function fetchMatchResults(query: SeasonRoundQuery): Promise<Result<MatchResult[], Error>>;
588
+ declare function fetchMatches(query: MatchQuery): Promise<Result<Match[], Error>>;
525
589
  /**
526
590
  * Fetch player biographical details (DOB, height, draft info, etc.).
527
591
  *
528
- * Dispatches to the appropriate data source based on `query.source`.
529
- * When `query.team` is omitted, returns details for all teams.
530
- *
531
- * @param query - Source, optional team name, and optional season/competition filters.
532
- * @returns Array of player details.
592
+ * `query.team` selects one team; omit it to fetch every senior team.
593
+ * Career counts (`gamesPlayed`, `goals`) come from the source's
594
+ * team-list page on FootyWire and AFL Tables; AFL API doesn't carry
595
+ * career stats so they stay `null` for that source.
533
596
  *
534
597
  * @example
535
598
  * ```ts
@@ -544,12 +607,9 @@ declare function fetchPlayerDetails(query: PlayerDetailsQuery): Promise<Result<P
544
607
  /**
545
608
  * Fetch per-player match statistics.
546
609
  *
547
- * @param query - Source, season, optional round/matchId, and competition.
548
- * @returns Array of player stats.
549
- *
550
610
  * @example
551
611
  * ```ts
552
- * const result = await fetchPlayerStats({
612
+ * await fetchPlayerStats({
553
613
  * source: "afl-api", season: 2025, round: 1, competition: "AFLM"
554
614
  * });
555
615
  * ```
@@ -558,46 +618,33 @@ declare function fetchPlayerStats2(query: PlayerStatsQuery): Promise<Result<Play
558
618
  /**
559
619
  * Fetch team-level aggregate statistics for a season.
560
620
  *
561
- * Returns per-team stat totals or averages from FootyWire or AFL Tables.
562
- * Not available from the AFL API or Squiggle.
563
- *
564
- * @param query - Source, season, and optional summary type.
565
- * @returns Array of team stats entries.
621
+ * TeamStatsQuery has no per-call competition (every TeamStats source we
622
+ * support is AFLM-only), so dispatch checks coverage against AFLM by
623
+ * convention.
566
624
  *
567
625
  * @example
568
626
  * ```ts
569
627
  * const result = await fetchTeamStats({ source: "footywire", season: 2024 });
570
- * if (result.success) {
571
- * for (const entry of result.data) {
572
- * console.log(entry.team, entry.stats);
573
- * }
574
- * }
575
628
  * ```
576
629
  */
577
630
  declare function fetchTeamStats2(query: TeamStatsQuery): Promise<Result<TeamStatsEntry[], Error>>;
578
631
  /**
579
632
  * Fetch team lists.
580
633
  *
581
- * @param query - Optional competition and team type filters.
634
+ * @param query - Optional competition filter (defaults to AFLM and AFLW combined).
582
635
  * @returns Array of teams.
583
636
  */
584
637
  declare function fetchTeams2(query?: TeamQuery): Promise<Result<Team[], Error>>;
585
638
  /**
586
639
  * Fetch a team's squad roster for a season.
587
640
  *
588
- * @param query - Team ID, season, and optional competition.
589
- * @returns Squad with player list.
641
+ * `query.team` is the canonical team name; adapters handle their own
642
+ * translation (AFL API resolves it to a numeric ID; scrapers use the
643
+ * name directly). When `query.source` is omitted, routes to the default
644
+ * source for the squad capability.
590
645
  */
591
646
  declare function fetchSquad2(query: SquadQuery): Promise<Result<Squad, Error>>;
592
647
  /**
593
- * AEST/AEDT-aware date parsing and formatting utilities.
594
- *
595
- * All functions use only Web Standard APIs (Date, Intl.DateTimeFormat).
596
- * No Node.js built-ins or third-party date libraries.
597
- *
598
- * @module
599
- */
600
- /**
601
648
  * Parse any AFL date string or timestamp into a correct UTC Date.
602
649
  *
603
650
  * Accepts every format seen across AFL data sources and always returns
@@ -1851,8 +1898,13 @@ declare class AflApiClient {
1851
1898
  /**
1852
1899
  * Resolve a competition code (e.g. "AFLM") to its API competition ID.
1853
1900
  *
1901
+ * Returns the hardcoded mapping from {@link AFL_API_COMP_IDS}. The previous
1902
+ * implementation looked up by `code` field on `/competitions`, but four
1903
+ * competitions share `code="AFL"` (Premiership, Preseason, Origin,
1904
+ * Indigenous All Stars), so the lookup was load-bearing on response order.
1905
+ *
1854
1906
  * @param code - The competition code to resolve.
1855
- * @returns The competition ID string on success.
1907
+ * @returns The competition ID on success.
1856
1908
  */
1857
1909
  resolveCompetitionId(code: CompetitionCode): Promise<Result<number, AflApiError | ValidationError>>;
1858
1910
  /**
@@ -1899,7 +1951,9 @@ declare class AflApiClient {
1899
1951
  * @param seasonId - The compseason ID.
1900
1952
  * @returns Aggregated array of match items from all completed rounds.
1901
1953
  */
1902
- fetchSeasonMatchItems(seasonId: number): Promise<Result<MatchItem[], AflApiError | ValidationError>>;
1954
+ fetchSeasonMatchItems(seasonId: number, options?: {
1955
+ includeUpcoming?: boolean;
1956
+ }): Promise<Result<MatchItem[], AflApiError | ValidationError>>;
1903
1957
  /**
1904
1958
  * Fetch per-player statistics for a match.
1905
1959
  *
@@ -1915,12 +1969,15 @@ declare class AflApiClient {
1915
1969
  */
1916
1970
  fetchMatchRoster(matchProviderId: string): Promise<Result<MatchRoster, AflApiError | ValidationError>>;
1917
1971
  /**
1918
- * Fetch team list, optionally filtered by team type.
1972
+ * Fetch team list, optionally filtered by competition.
1973
+ *
1974
+ * Pass a `CompetitionCode` to scope the result to that competition's teams
1975
+ * (uses {@link AFL_API_TEAM_TYPES} internally).
1919
1976
  *
1920
- * @param teamType - Optional filter (e.g. "MEN", "WOMEN").
1977
+ * @param competition - Optional CompetitionCode filter (e.g. "AFLM", "VFL").
1921
1978
  * @returns Array of team items.
1922
1979
  */
1923
- fetchTeams(teamType?: string): Promise<Result<TeamItem[], AflApiError | ValidationError>>;
1980
+ fetchTeams(competition?: CompetitionCode): Promise<Result<TeamItem[], AflApiError | ValidationError>>;
1924
1981
  /**
1925
1982
  * Fetch squad (roster) for a team in a specific season.
1926
1983
  *
@@ -2003,7 +2060,7 @@ declare class AflTablesClient {
2003
2060
  * @param year - The season year (1897 to present).
2004
2061
  * @returns Array of match results.
2005
2062
  */
2006
- fetchSeasonResults(year: number): Promise<Result<MatchResult[], ScrapeError>>;
2063
+ fetchSeasonResults(year: number): Promise<Result<Match[], ScrapeError>>;
2007
2064
  /**
2008
2065
  * Fetch player statistics for an entire season from AFL Tables.
2009
2066
  *
@@ -2059,7 +2116,7 @@ declare class FootyWireClient {
2059
2116
  * @param year - The season year.
2060
2117
  * @returns Array of match results.
2061
2118
  */
2062
- fetchSeasonResults(year: number): Promise<Result<MatchResult[], ScrapeError>>;
2119
+ fetchSeasonResults(year: number): Promise<Result<Match[], ScrapeError>>;
2063
2120
  /**
2064
2121
  * Fetch player statistics for a single match.
2065
2122
  *
@@ -2101,7 +2158,7 @@ declare class FootyWireClient {
2101
2158
  * @param year - The season year.
2102
2159
  * @returns Array of fixture entries.
2103
2160
  */
2104
- fetchSeasonFixture(year: number): Promise<Result<Fixture[], ScrapeError>>;
2161
+ fetchSeasonFixture(year: number): Promise<Result<Match[], ScrapeError>>;
2105
2162
  /**
2106
2163
  * Fetch team statistics from FootyWire.
2107
2164
  *
@@ -2180,7 +2237,7 @@ declare class SquiggleClient {
2180
2237
  * home-and-away results up to this round are included.
2181
2238
  * @returns Sorted ladder entries.
2182
2239
  */
2183
- declare function computeLadder(results: readonly MatchResult[], upToRound?: number): LadderEntry[];
2240
+ declare function computeLadder(results: readonly Match[], upToRound?: number): LadderEntry[];
2184
2241
  import { DataFrame as DataFrame2 } from "@jackemcpherson/rds-js";
2185
2242
  /** Parameters for filtering and mapping fryzigg data. */
2186
2243
  interface FryziggTransformOptions {
@@ -2216,14 +2273,14 @@ declare function transformMatchRoster(roster: MatchRoster, season: number, round
2216
2273
  /** Infer RoundType from a round name string. */
2217
2274
  declare function inferRoundType(roundName: string): RoundType;
2218
2275
  /**
2219
- * Transform raw AFL API match items into typed MatchResult objects.
2276
+ * Transform raw AFL API match items into typed Match objects.
2220
2277
  *
2221
2278
  * @param items - Raw match items from the /cfs/ endpoint.
2222
2279
  * @param season - The season year for these matches.
2223
2280
  * @param competition - The competition code.
2224
- * @returns Flattened, normalised MatchResult array.
2281
+ * @returns Flattened, normalised Match array.
2225
2282
  */
2226
- declare function transformMatchItems(items: readonly MatchItem[], season: number, competition: CompetitionCode, source?: DataSource): MatchResult[];
2283
+ declare function transformMatchItems(items: readonly MatchItem[], season: number, competition: CompetitionCode, source?: DataSource): Match[];
2227
2284
  /** Context for a single match transform. */
2228
2285
  interface TransformContext {
2229
2286
  readonly matchId: string;
@@ -2245,19 +2302,19 @@ interface TransformContext {
2245
2302
  */
2246
2303
  declare function transformPlayerStats(data: PlayerStatsList, ctx: TransformContext): PlayerStats[];
2247
2304
  /**
2248
- * Transform Squiggle games into MatchResult objects.
2305
+ * Transform Squiggle games into Match objects.
2249
2306
  *
2250
2307
  * Only includes games that are complete (complete === 100).
2251
2308
  */
2252
- declare function transformSquiggleGamesToResults(games: readonly SquiggleGame[], season: number): MatchResult[];
2309
+ declare function transformSquiggleGamesToResults(games: readonly SquiggleGame[], season: number): Match[];
2253
2310
  /**
2254
- * Transform Squiggle games into Fixture objects.
2311
+ * Transform Squiggle games into Match objects (any status).
2255
2312
  *
2256
- * Includes all games regardless of completion status.
2313
+ * Score fields are null for upcoming/incomplete matches.
2257
2314
  */
2258
- declare function transformSquiggleGamesToFixture(games: readonly SquiggleGame[], season: number): Fixture[];
2315
+ declare function transformSquiggleGamesToFixture(games: readonly SquiggleGame[], season: number): Match[];
2259
2316
  /**
2260
2317
  * Transform Squiggle standings into LadderEntry objects.
2261
2318
  */
2262
2319
  declare function transformSquiggleStandings(standings: readonly SquiggleStanding[]): LadderEntry[];
2263
- export { transformSquiggleStandings, transformSquiggleGamesToResults, transformSquiggleGamesToFixture, transformPlayerStats, transformMatchRoster, transformMatchItems, transformLadderEntries, transformFryziggPlayerStats, toAestString, parseFootyWireDate, parseDate, parseAflTablesDate, parseAflApiMatchTime, parseAflApiDate, ok, normaliseVenueName, normaliseTeamName, inferRoundType, fetchTeams2 as fetchTeams, fetchTeamStats2 as fetchTeamStats, fetchSquad2 as fetchSquad, fetchPlayerStats2 as fetchPlayerStats, fetchPlayerDetails, fetchMatchResults, fetchLineup, fetchLadder2 as fetchLadder, fetchFixture, fetchCoachesVotes, fetchAwards, err, computeLadder, ValidationError, UnsupportedSourceError, TransformContext, TeamStatsSummaryType, TeamStatsQuery, TeamStatsEntry, TeamScoreSchema, TeamScore, TeamQuery, TeamPlayersSchema, TeamPlayers, TeamListSchema, TeamList, TeamItemSchema, TeamItem, Team, SquiggleStandingsResponseSchema, SquiggleStandingsResponse, SquiggleStandingSchema, SquiggleStanding, SquiggleGamesResponseSchema, SquiggleGamesResponse, SquiggleGameSchema, SquiggleGame, SquiggleClientOptions, SquiggleClient, SquadSchema, SquadQuery, SquadPlayerItemSchema, SquadPlayerItem, SquadPlayerInnerSchema, SquadPlayer, SquadListSchema, SquadList, Squad, SeasonRoundQuery, ScrapeError, ScoreSchema, Score, RoundType, RoundSchema, RoundListSchema, RoundList, Round, RosterPlayerSchema, RosterPlayer, RisingStarNomination, Result, QuarterScore, PlayerStatsQuery, PlayerStatsListSchema, PlayerStatsList, PlayerStatsItemSchema, PlayerStatsItem, PlayerStats, PlayerGameStatsSchema, PlayerGameStats, PlayerDetailsQuery, PlayerDetails, PeriodScoreSchema, PeriodScore, Ok, MatchStatus, MatchRosterSchema, MatchRoster, MatchResult, MatchQuery, MatchItemSchema, MatchItemListSchema, MatchItemList, MatchItem, LineupQuery, LineupPlayer, Lineup, LadderResponseSchema, LadderResponse, LadderQuery, LadderEntryRawSchema, LadderEntryRaw, LadderEntry, Ladder, FryziggTransformOptions, FryziggClientOptions, FryziggClient, FootyWireClientOptions, FootyWireClient, Fixture, Err, DataSource, CompseasonSchema, CompseasonListSchema, CompseasonList, Compseason, CompetitionSchema, CompetitionListSchema, CompetitionList, CompetitionCode, Competition, CoachesVoteQuery, CoachesVote, CfsVenueSchema, CfsVenue, CfsScoreSchema, CfsScore, CfsMatchTeamSchema, CfsMatchTeam, CfsMatchSchema, CfsMatch, BrownlowVote, AwardType, AwardQuery, Award, AllAustralianSelection, AflTablesClientOptions, AflTablesClient, AflCoachesClientOptions, AflCoachesClient, AflApiTokenSchema, AflApiToken, AflApiError, AflApiClientOptions, AflApiClient };
2320
+ export { transformSquiggleStandings, transformSquiggleGamesToResults, transformSquiggleGamesToFixture, transformPlayerStats, transformMatchRoster, transformMatchItems, transformLadderEntries, transformFryziggPlayerStats, toAestString, parseFootyWireDate, parseDate, parseAflTablesDate, parseAflApiMatchTime, parseAflApiDate, ok, normaliseVenueName, normaliseTeamName, inferRoundType, fetchTeams2 as fetchTeams, fetchTeamStats2 as fetchTeamStats, fetchSquad2 as fetchSquad, fetchPlayerStats2 as fetchPlayerStats, fetchPlayerDetails, fetchMatches, fetchLineup, fetchLadder2 as fetchLadder, fetchAwards, err, computeLadder, ValidationError, UnsupportedSourceError, TransformContext, TeamStatsSummaryType, TeamStatsQuery, TeamStatsEntry, TeamScoreSchema, TeamScore, TeamQuery, TeamPlayersSchema, TeamPlayers, TeamListSchema, TeamList, TeamItemSchema, TeamItem, Team, SquiggleStandingsResponseSchema, SquiggleStandingsResponse, SquiggleStandingSchema, SquiggleStanding, SquiggleGamesResponseSchema, SquiggleGamesResponse, SquiggleGameSchema, SquiggleGame, SquiggleClientOptions, SquiggleClient, SquadSchema, SquadQuery, SquadPlayerItemSchema, SquadPlayerItem, SquadPlayerInnerSchema, SquadPlayer, SquadListSchema, SquadList, Squad, SeasonRoundQuery, ScrapeError, ScoreSchema, Score, RoundType, RoundSchema, RoundListSchema, RoundList, Round, RosterPlayerSchema, RosterPlayer, RisingStarNomination, Result, QuarterScore, PlayerStatsQuery, PlayerStatsListSchema, PlayerStatsList, PlayerStatsItemSchema, PlayerStatsItem, PlayerStats, PlayerGameStatsSchema, PlayerGameStats, PlayerDetailsQuery, PlayerDetails, PeriodScoreSchema, PeriodScore, Ok, MatchStatus, MatchRosterSchema, MatchRoster, MatchQuery, MatchItemSchema, MatchItemListSchema, MatchItemList, MatchItem, Match, LineupQuery, LineupPlayer, Lineup, LadderResponseSchema, LadderResponse, LadderQuery, LadderEntryRawSchema, LadderEntryRaw, LadderEntry, Ladder, FryziggTransformOptions, FryziggClientOptions, FryziggClient, FootyWireClientOptions, FootyWireClient, Err, DataSource, CompseasonSchema, CompseasonListSchema, CompseasonList, Compseason, CompetitionSchema, CompetitionListSchema, CompetitionList, CompetitionCode, Competition, ColemanLeader, CoachesVoteQuery, CoachesVote, CfsVenueSchema, CfsVenue, CfsScoreSchema, CfsScore, CfsMatchTeamSchema, CfsMatchTeam, CfsMatchSchema, CfsMatch, BrownlowVote, AwardType, AwardQuery, Award, AllAustralianSelection, AflTablesClientOptions, AflTablesClient, AflCoachesClientOptions, AflCoachesClient, AflApiTokenSchema, AflApiToken, AflApiError, AflApiClientOptions, AflApiClient };