Skip to content

feat(bindings): expose parentEventId on Event#125

Merged
cesarenaldi merged 1 commit into
mainfrom
feature/event-parent-event-id
Jun 11, 2026
Merged

feat(bindings): expose parentEventId on Event#125
cesarenaldi merged 1 commit into
mainfrom
feature/event-parent-event-id

Conversation

@cesarenaldi

@cesarenaldi cesarenaldi commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

The wire schema already parsed parentEventId but normalizeEvent dropped it, so the public Event never exposed it. Sports "more markets" events carry this field as a link to their parent game event.

Not in scope: the listEvents parentEventId request filter still only accepts a number, same as the other ID filters (ids, seriesIds). Aligning the filter inputs with branded string IDs is a broader consistency change worth a separate pass.

Verification

  • pnpm lint, pnpm build, pnpm typecheck pass.
  • pnpm test:types, pnpm test:bindings (15), pnpm test:client (123) pass.
  • New bindings tests cover int-to-EventId normalization and absent/null defaults (the regression here was the normalizer silently dropping the field).
  • Live smoke against the built client: fetchEvent({ id: '570555' }) returns parentEventId === '570146', round-trips via fetchEvent({ id: child.parentEventId }), and the parent's own parentEventId is undefined.

Note

Low Risk
Additive, read-only API surface on event parsing with targeted tests; no auth or write-path changes.

Overview
Exposes parentEventId on the public Event type so child events (e.g. sports “more markets”) can reference their parent. The Gamma wire field was already parsed but normalizeEvent now forwards it instead of dropping it.

parentEventId is typed and parsed as EventId, matching Event.id: wire integers are normalized to string IDs via EventIdSchema (replacing a raw number on the schema). New bindings tests cover int→string normalization and absent/null handling.

Reviewed by Cursor Bugbot for commit 1903b61. Bugbot is set up for automated code reviews on this repo. Configure here.

@cesarenaldi cesarenaldi merged commit b4f709e into main Jun 11, 2026
8 checks passed
@cesarenaldi cesarenaldi deleted the feature/event-parent-event-id branch June 11, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant