Skip to content

feat: typed webhook events (catalog v2, 50 events)#9

Open
fjalil7 wants to merge 2 commits into
mainfrom
feature/bil-1567
Open

feat: typed webhook events (catalog v2, 50 events)#9
fjalil7 wants to merge 2 commits into
mainfrom
feature/bil-1567

Conversation

@fjalil7

@fjalil7 fjalil7 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Part of BIL-1567 — bring the v2 webhook event catalog (50 events) to the SDK.

Adds typed webhook payloads:

  • WebhookEventType constants for all 50 events
  • One dataclass per event, camelCase keys matching the wire
  • Shared auxiliary types for nested shapes (plan, card, features, seats, …)
  • A WebhookEvent envelope; verify_and_parse now returns it, with per-event as_<event>() narrowing

Same surface as the other SDKs (Node is the source of truth); cross-SDK parity verified.

The second commit is a format-only chore (ruff) for pre-existing drift, unrelated to webhooks.

Verified: ruff + 118 pytest + mypy --strict green.

🤖 Generated with Claude Code

fjalil7 added 2 commits June 15, 2026 20:21
Add the v2 webhook catalog (50 events) as typed payloads: event-name
constants, one dataclass per event, shared auxiliary types for nested
shapes, and a typed envelope with per-event as_<event>() narrowing.
verify_and_parse now returns the typed envelope instead of an untyped dict.
Format-only changes (line length, blank lines) in _http.py, _async_http.py
and _shared.py carried over from a prior commit; unrelated to webhooks,
included so the ruff format gate passes.
@linear-code

linear-code Bot commented Jun 15, 2026

Copy link
Copy Markdown

BIL-1567

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