docs(events): document notification/app-state payload sealing (whatsapp-rust#1003) - #398
Conversation
…pp-rust#1003) Updates concepts/events.mdx for oxidezap/whatsapp-rust#1003, which extends the pre-1.0 event-payload seal (#[non_exhaustive] + bon::Builder, started on ServerAck in #1002) to the 22 notification, presence, contact, group, and app-state-sync mutation payload structs. - Reworded the general payload-stability note to list every struct sealed so far instead of only calling out ServerAck. - Added #[non_exhaustive] and the bon::Builder derive to all 22 affected struct code blocks (SelfPushNameUpdated, ChatPresenceUpdate, PresenceUpdate, PictureUpdate, UserAboutUpdate, ContactUpdated, ContactNumberChanged, ContactSyncRequested, GroupUpdate, PushNameUpdate, ContactUpdate, PinUpdate, MuteUpdate, ArchiveUpdate, StarUpdate, MarkChatAsReadUpdate, DeleteChatUpdate, ClearChatUpdate, UserStatusMuteUpdate, DeleteMessageForMeUpdate, LabelEditUpdate, LabelAssociationUpdate). Construction sites move to `Type::builder()...build()`, but this is internal to the client (it dispatches these events) — no consumer-facing example in this doc constructs a payload, so only the struct definitions and the stability notes needed updating.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 41 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
No issues found across 1 file
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Documentation-only update to reflect event payload sealing for 22 structs; no source code, logic, or configuration changes.
Re-trigger cubic
What
Updates
concepts/events.mdxfor oxidezap/whatsapp-rust#1003, the second tranche of the pre-1.0 event-payload API freeze (afterServerAckin #1002, documented in #397).Why
whatsapp-rust#1003 seals 22 more event payload structs with
#[non_exhaustive]+#[derive(bon::Builder)]:ContactUpdate,PinUpdate,MuteUpdate,ArchiveUpdate,StarUpdate,MarkChatAsReadUpdate,DeleteChatUpdate,ClearChatUpdate,UserStatusMuteUpdate,DeleteMessageForMeUpdate,LabelEditUpdate,LabelAssociationUpdate.ChatPresenceUpdate,PresenceUpdate,PictureUpdate,UserAboutUpdate,ContactUpdated,ContactNumberChanged,ContactSyncRequested,GroupUpdate,PushNameUpdate,SelfPushNameUpdated.The docs' payload-stability notes and every one of these structs' code blocks still showed the pre-#1003 "not sealed" shape (
#[derive(Debug, Clone, Serialize)]with no#[non_exhaustive]), so they were out of date.Changes
concepts/events.mdx:<Note>under theEventenum to name every struct sealed so far (not justServerAck), and to note that message/newsletter and pairing payloads remain unsealed for now.ServerAck-specific note's tense (is the first→was the first) now that other payloads have followed.#[non_exhaustive]and thebon::Builderderive to all 22 affected struct code blocks.No consumer-facing example in this doc constructs a payload directly (they all bind the whole
Eventvariant and read fields, e.g.Event::Presence(update) => { update.unavailable }), so no example code needed changes — construction viaType::builder()…build()is internal to the client.No changelog entry added, per instructions that changelog entries are human-authored.
Ref: oxidezap/whatsapp-rust#1003
Generated by Claude Code
Summary by cubic
Update concepts/events.mdx to document event payload sealing from oxidezap/whatsapp-rust#1003. Add
#[non_exhaustive]andbon::Builderto 22 notification, presence, contact, group, and app‑state mutation structs, and update stability notes; examples unchanged.Written for commit 7302128. Summary will update on new commits.