feat(catalog): add bonus_items and metadata to FreeItem - #33
Merged
Conversation
dinosoeren
force-pushed
the
feat/free-item-bonus-items-and-metadata
branch
from
July 23, 2026 01:20
9c77de3 to
192daca
Compare
Adds two optional fields to the egress catalog FreeItem message: - repeated bonus_items, each a typed bonus reward (type + id + amount) granted when the item is claimed; the only reward kind granted today is LOYALTY_POINTS. - a metadata map of opaque key-value pairs forwarded to webhook events, mirroring the product metadata field (not for display or business logic). Regenerated the merged OpenAPI spec. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dinosoeren
force-pushed
the
feat/free-item-bonus-items-and-metadata
branch
from
July 23, 2026 01:21
192daca to
3667f79
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two optional fields to the egress catalog
FreeItemmessage so a free (claimable) catalog item can declare bonus rewards and forward webhook metadata:bonus_items— a repeated list of typed bonus rewards (type+id+amount) granted when the item is claimed. The only reward kind granted today isLOYALTY_POINTS; other/unspecified types are ignored by consumers.metadata— amap<string, string>of opaque key-value pairs forwarded to webhook events for the item, mirroring the existing productmetadatafield (not for display or business logic).Both fields are additive and optional, so existing responses are unaffected. Regenerated the merged OpenAPI spec (
docs/gen/swagger.v1.json).Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Low Risk
Additive protobuf/OpenAPI contract changes only; no runtime logic in this diff, so backward compatibility is preserved for clients that omit the new fields.
Overview
Extends egress catalog
FreeItemwith two optional fields and regeneratesswagger.v1.json.bonus_itemsis a repeatedFreeBonusItem(type,id,amount) describing extra rewards on claim (e.g. loyalty points). A newFreeBonusItemTypeenum is added; onlyLOYALTY_POINTSis granted today—other values are documented as ignored by consumers.amountis validated as a non-empty digit string for large integers.metadatais amap<string, string>for opaque key-value data forwarded on related webhook events, aligned with purchasable productmetadata(not for UI or business logic).Both fields are additive; existing
FreeItempayloads stay valid without them.Reviewed by Cursor Bugbot for commit 3667f79. Bugbot is set up for automated code reviews on this repo. Configure here.