Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

All notable changes to `@sharp-api/client` are documented here.

## 0.4.1 — 2026-06-02

### Added — structured `team_side` + `market_segment` (issue #76 / #689)

- `NormalizedOdds`, `EVOpportunity`, and `ClosingOdd` gain optional `team_side`
(`'home' | 'away' | 'draw' | 'over' | 'under'`) and `market_segment`
(`string`). Wire keys are snake_case (the client returns raw JSON without key
transforms), matching `is_active`.
- `team_side` is the raw structured side decomposed out of the compound
`selectionType` / `selection_type` vocabulary — prefer it over parsing compound
prefixes like `'home_over'`. `market_segment` is the canonical contest slice.
- `NormalizedOdds.selectionType` widened with `(string & {})` so it accepts the
team-total compound forms (`'home_over'`, ...) the server emits without a major
bump. Additive, non-breaking.

## 0.4.0 — 2026-06-02

### Changed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sharp-api/client",
"version": "0.4.0",
"version": "0.4.1",
"description": "Official TypeScript/JavaScript client for the SharpAPI real-time sports betting odds API",
"type": "module",
"main": "./dist/index.cjs",
Expand Down
19 changes: 19 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,17 @@ export interface NormalizedOdds extends NestedRefs {
| 'home_draw'
| 'away_draw'
| 'home_away'
| (string & {})
/**
* Raw structured side axis ("home" | "away" | "draw") decomposed out of the
* compound selectionType vocabulary (issue #76). Optional + additive — absent
* when the adapter didn't stamp it. Wire key is snake_case `team_side` (the
* client returns raw JSON without key transforms). Prefer over parsing
* compound selectionType prefixes like "home_over".
*/
team_side?: 'home' | 'away' | 'draw' | 'over' | 'under'
/** Canonical contest slice ("full_game" | "1st_half" | ...) — issue #689. Wire key snake_case. */
market_segment?: string
odds: OddsValue
line?: number
eventStartTime: string
Expand Down Expand Up @@ -336,6 +347,10 @@ export interface EVOpportunity extends NestedRefs {
fairProbability: number
evPercentage: number
kellyPercent: number
/** Raw structured side axis ("home" | "away" | "draw") — issue #76. Optional; wire key snake_case `team_side`. */
team_side?: 'home' | 'away' | 'draw' | 'over' | 'under'
/** Canonical contest slice ("full_game" | "1st_half" | ...) — issue #689. Wire key snake_case. */
market_segment?: string
detectedAt: string
}

Expand Down Expand Up @@ -550,6 +565,10 @@ export interface ClosingOdd {
| 'away_draw'
| 'home_away'
| (string & {})
/** Raw structured side axis ("home" | "away" | "draw") — issue #76. Optional + additive. */
team_side?: 'home' | 'away' | 'draw' | 'over' | 'under'
/** Canonical contest slice ("full_game" | "1st_half" | ...) — issue #689. */
market_segment?: string
odds_american: number
odds_decimal: number
/** Spread / total line — present only on point-spread and totals markets. */
Expand Down