ENG-1490: webhook event docs#34
Conversation
PR 1 of ENG-1490 makes the webhook worker fully dynamic — every event a Spectrum provider declares is discovered and forwarded with no per-event worker plumbing. Update the events spec to: - Replace the closed `WebhookEventPayload` union with the generic `WebhookEventEnvelope` shape the worker now emits. - Note that the `messages` arm is byte-identical to the prior contract. - Reframe "Forward compatibility" — new events appear automatically as providers ship them, not on a per-version deploy cadence. - Drop the stale "read receipts/typing/reactions coming soon" line in delivery.mdx; the next PR adds the iMessage event producers that will fill those gaps (except typing, still upstream-blocked). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a per-event reference section to `webhooks/events.mdx` covering the six new iMessage event arms PR 2 of ENG-1490 ships: - readReceipt - chatRead - messageEdit - messageUnsend - reactionRemoved - groupChange Each entry documents the wire payload, the platform-specific quirks (e.g. iMessage edits only carry text content, tapback emoji mapping, participantLeft having no `actor`), and how the field relates to the matching `messages` delivery a customer would store locally. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…490) After the ENG-1490 design pivot, custom events (readReceipt, chatRead, etc.) are produced inside the webhook worker rather than declared on the spectrum-ts SDK. The wire format is unchanged, but the prose about "providers declare events automatically" no longer matches reality — soften it to "new event types are added as the webhook gains new producers." Per-event reference tables stay as-is; customers don't care where the projection runs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolve conflicts in favor of the PR's new multi-event model: - docs-src/webhooks/events.mdx.vel: keep the generic WebhookEventEnvelope discriminator and the "canonical inbound-message arm" framing; main's "messages is the only event" text is superseded by the iMessage events this PR documents. - webhooks/delivery.mdx: keep the PR's "What we don't deliver" bullet; main's "read receipts aren't delivered / edits aren't separate events" text is superseded (this PR adds readReceipt + messageEdit events). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🤖 Merged latest Conflicts found (2 files):
Verification: |
# Conflicts: # docs-src/webhooks/events.mdx.vel # webhooks/delivery.mdx
|
Resolved merge conflicts with Two conflicts, both in hand-authored content (no lockfile/generated-file conflicts): 1.
2.
Resolution: kept this PR's version on both. Rationale: the two sides encode contradictory models. This PR's entire purpose is documenting six standalone iMessage events ( I verified the auto-merged regions stay coherent with the six-events model: reactions added still ride the
Verified after resolution: |
Summary
Documentation for the ENG-1490 webhook event work. Covers the dynamic envelope (
{ event, platform, ...payload }) and the six iMessage event types now produced by the webhook.Companion to spectrum-webhook#4. (The originally-planned spectrum-ts changes were reverted in favor of a webhook-only design.)
Three commits
WebhookEventEnvelope, note themessagesarm is byte-identical to the prior contract, drop the stale "read receipts/typing/reactions coming soon" line indelivery.mdx.readReceipt,chatRead,messageEdit,messageUnsend,reactionRemoved,groupChange. Documents platform-specific quirks (text-only edits, tapback → emoji mapping,participantLefthaving noactor, etc.).Test plan
bun run docs:generatebuilds the rendered.mdxwithout errors.🤖 Generated with Claude Code