Skip to content

v0.3.1 — nested refs + TeamRef metadata

Choose a tag to compare

@Mlaz-code Mlaz-code released this 07 May 14:32
· 2 commits to main since this release

Bundles the 0.3.0 (nested refs) and 0.3.1 (TeamRef metadata) work into a single published release. 0.3.0 was never tagged; install 0.3.1 to get all of it.

Added

Nested reference objects (was 0.3.0)

Every odds, opportunity, and reference-list row may now carry optional structured ref objects alongside the legacy flat fields. All additive — clients on older API versions just see undefined and behave identically.

  • New interfaces: TeamRef, SportRef, EntityRef, Team, Market, NestedRefs bundle
  • Typed LowHoldOpportunity (was loosely typed before)
  • NormalizedOdds, EVOpportunity, ArbitrageOpportunity, MiddleOpportunity extend NestedRefs
  • ArbitrageLeg gains sportsbook_ref
  • ClosingOdd gains market_ref + sportsbook_ref
  • ClosingSnapshot gains home, away, sport_ref, league_ref
  • Sport, League, Sportsbook gain numerical_id

TeamRef metadata (was 0.3.1)

TeamRef and the Team reference shape gain five optional metadata fields:

  • logo — full CDN URL (~93% coverage)
  • city, mascot, conference, division

All default to undefined. Older servers that omit them keep working.

Repo / packaging hygiene

  • Add LICENSE (MIT) and SECURITY.md (hello@sharpapi.io)
  • Author email updated support@hello@
  • Fix README install + JSDoc import: package is @sharp-api/client (not @sharpapi/client)
  • Strip sourcesContent from npm sourcemaps so the .map files no longer ship a full copy of src/index.ts. Tarball: 57.7 kB → 31.0 kB.
  • Drop tests/ from the repo (kept locally for development); CI gate is now biome + tsc across Node 18/20/22

Compatibility

No existing field was renamed, retyped, or removed. Code on 0.2.x continues to compile.